ソースを参照

do not try to process an empty message

When no message is complete and no error occurred,
an empty message is returned.
Julius Pfrommer 7 年 前
コミット
414032bcf9
共有1 個のファイルを変更した6 個の追加0 個の削除を含む
  1. 6 0
      src/server/ua_server_binary.c

+ 6 - 0
src/server/ua_server_binary.c

@@ -614,6 +614,12 @@ processBinaryMessage(UA_Server *server, UA_Connection *connection,
                      UA_ByteString *message) {
     UA_Boolean realloced = UA_FALSE;
     UA_StatusCode retval = UA_Connection_completeMessages(connection, message, &realloced);
+
+    /* No failure, but no chunk ready */
+    if(message->length == 0)
+        return;
+
+    /* Failed to complete a chunk */
     if(retval != UA_STATUSCODE_GOOD) {
         if(!realloced)
             connection->releaseRecvBuffer(connection, message);