Quellcode durchsuchen

do not try to process an empty message

When no message is complete and no error occurred,
an empty message is returned.
Julius Pfrommer vor 7 Jahren
Ursprung
Commit
414032bcf9
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  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);