From 6862b8c64c37d505f6cbb6eb9a8f7795998be3cb Mon Sep 17 00:00:00 2001 From: Jason Valenzuela Date: Sat, 8 Jan 2022 20:48:47 -0500 Subject: [PATCH] Add parameters to functions to conform to CipServiceFunction signature. Resolves incompatible pointer type compiler warnings when pointers to these functions are passed to InsertService(). --- source/src/cip/cipconnectionmanager.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/source/src/cip/cipconnectionmanager.c b/source/src/cip/cipconnectionmanager.c index 2c333c787..5dc1f1fe5 100644 --- a/source/src/cip/cipconnectionmanager.c +++ b/source/src/cip/cipconnectionmanager.c @@ -81,11 +81,15 @@ EipStatus GetConnectionOwner(CipInstance *instance, EipStatus GetConnectionData(CipInstance *instance, CipMessageRouterRequest *message_router_request, - CipMessageRouterResponse *message_router_response); + CipMessageRouterResponse *message_router_response, + const struct sockaddr *originator_address, + const CipUdint encapsulation_session); EipStatus SearchConnectionData(CipInstance *instance, CipMessageRouterRequest *message_router_request, - CipMessageRouterResponse *message_router_response); + CipMessageRouterResponse *message_router_response, + const struct sockaddr *originator_address, + const CipUdint encapsulation_session); void AssembleConnectionDataResponseMessage( CipMessageRouterResponse *message_router_response, @@ -752,9 +756,13 @@ EipStatus GetConnectionOwner(CipInstance *instance, EipStatus GetConnectionData(CipInstance *instance, CipMessageRouterRequest *message_router_request, - CipMessageRouterResponse *message_router_response) { + CipMessageRouterResponse *message_router_response, + const struct sockaddr *originator_address, + const CipUdint encapsulation_session) { /* Suppress unused parameter compiler warning. */ (void)instance; + (void)originator_address; + (void)encapsulation_session; CIPServiceCode service_code = kGetConnectionData; message_router_response->reply_service = (0x80 | service_code); @@ -797,10 +805,13 @@ EipStatus GetConnectionData(CipInstance *instance, EipStatus SearchConnectionData(CipInstance *instance, CipMessageRouterRequest *message_router_request, - CipMessageRouterResponse *message_router_response) -{ + CipMessageRouterResponse *message_router_response, + const struct sockaddr *originator_address, + const CipUdint encapsulation_session) { /* Suppress unused parameter compiler warning. */ (void)instance; + (void)originator_address; + (void)encapsulation_session; CIPServiceCode service_code = kSearchConnectionData; message_router_response->reply_service = (0x80 | service_code);