Browse Source

fix stateless extension

Julius Pfrommer 9 years ago
parent
commit
b410fa5d1d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/server/ua_server_binary.c

+ 5 - 0
src/server/ua_server_binary.c

@@ -222,8 +222,13 @@ static void processMSG(UA_Connection *connection, UA_Server *server, const UA_By
     UA_SequenceHeader sequenceHeader;
     retval = UA_UInt32_decodeBinary(msg, pos, &tokenId);
     retval |= UA_SequenceHeader_decodeBinary(msg, pos, &sequenceHeader);
+#ifndef EXTENSION_STATELESS
     if(retval != UA_STATUSCODE_GOOD || tokenId == 0) // 0 is invalid
         return;
+#else
+    if(retval != UA_STATUSCODE_GOOD)
+        return;
+#endif
 
     if(clientChannel != &anonymousChannel && tokenId != clientChannel->securityToken.tokenId) {
         if(tokenId != clientChannel->nextSecurityToken.tokenId) {