Browse Source

fix client log

StalderT 7 years ago
parent
commit
821d5fffdb
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/client.c
  2. 1 1
      examples/client_subscription_loop.c

+ 1 - 1
examples/client.c

@@ -103,7 +103,7 @@ int main(int argc, char *argv[]) {
     UA_Client_Subscriptions_addMonitoredItem(client, subId, monitorThis, UA_ATTRIBUTEID_VALUE,
                                              &handler_TheAnswerChanged, NULL, &monId, 250);
     if(monId)
-        printf("Monitoring 'the.answer', id %u\n", subId);
+        printf("Monitoring 'the.answer', id %u\n", monId);
     /* The first publish request should return the initial value of the variable */
     UA_Client_Subscriptions_manuallySendPublishRequest(client);
 #endif

+ 1 - 1
examples/client_subscription_loop.c

@@ -83,7 +83,7 @@ stateCallback (UA_Client *client, UA_ClientState clientState) {
             UA_Client_Subscriptions_addMonitoredItem(client, subId, monitorThis, UA_ATTRIBUTEID_VALUE,
                                                      &handler_currentTimeChanged, NULL, &monId, 250);
             if(monId)
-                UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "Monitoring UA_NS0ID_SERVER_SERVERSTATUS_CURRENTTIME', id %u", subId);
+                UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "Monitoring UA_NS0ID_SERVER_SERVERSTATUS_CURRENTTIME', id %u", monId);
         }
         break; 
         case UA_CLIENTSTATE_SESSION_RENEWED: