浏览代码

removed unneded timeToRenewSecureChannel parameter, relates #505

Stasik0 9 年之前
父节点
当前提交
428afdb2e4
共有 2 个文件被更改,包括 1 次插入3 次删除
  1. 0 1
      include/ua_client.h
  2. 1 2
      src/client/ua_client.c

+ 0 - 1
include/ua_client.h

@@ -17,7 +17,6 @@ typedef struct UA_Client UA_Client;
 typedef struct UA_ClientConfig {
     UA_Int32 timeout; //sync response timeout
     UA_Int32 secureChannelLifeTime; // lifetime in ms (then the channel needs to be renewed)
-    UA_Int32 timeToRenewSecureChannel; //time in ms  before expiration to renew the secure channel
     UA_ConnectionConfig localConnectionConfig;
 } UA_ClientConfig;
 

+ 1 - 2
src/client/ua_client.c

@@ -11,7 +11,6 @@
 
 const UA_EXPORT UA_ClientConfig UA_ClientConfig_standard =
     { .timeout = 5000 /* ms receive timout */, .secureChannelLifeTime = 30000,
-      .timeToRenewSecureChannel = 2000,
       {.protocolVersion = 0, .sendBufferSize = 65536, .recvBufferSize  = 65536,
        .maxMessageSize = 65536, .maxChunkCount = 1}};
 
@@ -169,7 +168,7 @@ static UA_StatusCode HelAckHandshake(UA_Client *c) {
 
 static UA_StatusCode SecureChannelHandshake(UA_Client *client, UA_Boolean renew) {
     /* Check if sc is still valid */
-    if(renew && client->scRenewAt - UA_DateTime_now() > client->config.timeToRenewSecureChannel * 10000)
+    if(renew && client->scRenewAt - UA_DateTime_now() > 0)
         return UA_STATUSCODE_GOOD;
 
     UA_Connection *c = &client->connection;