Kaynağa Gözat

fixes partially #278

Stasik0 9 yıl önce
ebeveyn
işleme
2410369656

+ 1 - 1
src/server/ua_securechannel_manager.c

@@ -28,7 +28,7 @@ void UA_SecureChannelManager_cleanupTimedOut(UA_SecureChannelManager *cm, UA_Dat
     /* remove channels that were not renewed or who have no connection attached */
     while(entry) {
         if(entry->channel.securityToken.createdAt +
-            (10000 * entry->channel.securityToken.revisedLifetime) > now &&
+            (UA_DateTime)entry->channel.securityToken.revisedLifetime*10000 > now &&
             entry->channel.connection) {
             entry = LIST_NEXT(entry, pointers);
         }

+ 1 - 1
src/server/ua_server.c

@@ -415,7 +415,7 @@ UA_Server * UA_Server_new(UA_ServerConfig config) {
 
 #define MAXCHANNELCOUNT 100
 #define STARTCHANNELID 1
-#define TOKENLIFETIME 600000
+#define TOKENLIFETIME 600000 //this is in milliseconds
 #define STARTTOKENID 1
     UA_SecureChannelManager_init(&server->secureChannelManager, MAXCHANNELCOUNT,
                                  TOKENLIFETIME, STARTCHANNELID, STARTTOKENID);