Procházet zdrojové kódy

Fix: CheckIoConnectionEvent() was called with wrong parameter order

The user application callback CheckIoConnectionEvent() is declared like

CheckIoConnectionEvent(... output_assembly_id, ... input_assembly_id, ...);

and therefore always has to be called with something like
"cnxn_object->consumed_path.instance_id" and
"cnxn_object->produced_path.instance_id" in that order.

Fixed the wrong order of the *assembly_id parameters of the call of this function
in HandleIoConnectionTimeOut().

Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Stefan Mätje před 6 roky
rodič
revize
4eb3176bf6
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      source/src/cip/cipioconnection.c

+ 2 - 2
source/src/cip/cipioconnection.c

@@ -727,8 +727,8 @@ void CloseIoConnection(CipConnectionObject *connection_object) {
 }
 }
 
 
 void HandleIoConnectionTimeOut(CipConnectionObject *connection_object) {
 void HandleIoConnectionTimeOut(CipConnectionObject *connection_object) {
-  CheckIoConnectionEvent(connection_object->produced_path.instance_id,
-                         connection_object->consumed_path.instance_id,
+  CheckIoConnectionEvent(connection_object->consumed_path.instance_id,
+                         connection_object->produced_path.instance_id,
                          kIoConnectionEventTimedOut);
                          kIoConnectionEventTimedOut);
 
 
   ConnectionObjectSetState(connection_object, kConnectionObjectStateTimedOut);
   ConnectionObjectSetState(connection_object, kConnectionObjectStateTimedOut);