Selaa lähdekoodia

Server: Don't create NodeId string if nothing is logged

Julius Pfrommer 4 vuotta sitten
vanhempi
commit
26d6729913
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/server/ua_session_manager.c

+ 2 - 0
src/server/ua_session_manager.c

@@ -113,12 +113,14 @@ UA_SessionManager_getSessionByToken(UA_SessionManager *sm, const UA_NodeId *toke
     }
 
     /* Session not found */
+#if UA_LOGLEVEL <= 300
     UA_String nodeIdStr = UA_STRING_NULL;
     UA_NodeId_toString(token, &nodeIdStr);
     UA_LOG_INFO(&sm->server->config.logger, UA_LOGCATEGORY_SESSION,
                 "Try to use Session with token %.*s but is not found",
                 (int)nodeIdStr.length, nodeIdStr.data);
     UA_String_deleteMembers(&nodeIdStr);
+#endif
     return NULL;
 }