Skip to content

Commit

Permalink
Add parameters to functions to conform to CipServiceFunction signature.
Browse files Browse the repository at this point in the history
Resolves incompatible pointer type compiler warnings when
pointers to these functions are passed to InsertService().
  • Loading branch information
jvalenzuela committed Apr 5, 2024
1 parent 0c70f24 commit da7858f
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions source/src/cip/cipconnectionmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit da7858f

Please sign in to comment.