Selaa lähdekoodia

Removed|Commented check '''if(arrayDimensionsSize != (size_t)valueRank)'''; empty arrays are being initialized in NS0, hence this condition cannot hold true in all cases.

ichrispa 8 vuotta sitten
vanhempi
commit
08b19b00e3
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/server/ua_services_attribute.c

+ 3 - 0
src/server/ua_services_attribute.c

@@ -464,8 +464,11 @@ UA_matchValueRankArrayDimensions(UA_Int32 valueRank, size_t arrayDimensionsSize)
     default: /* >= 1: the value is an array with the specified number of dimensions */
         if(valueRank < 0)
             return UA_STATUSCODE_BADTYPEMISMATCH;
+        /* The following is not correct: May be an empty array; See "ServerType"->"ServerArray" as an example
+         * Might hold true for other, specific use cases in userspace?
         if(arrayDimensionsSize != (size_t)valueRank)
             return UA_STATUSCODE_BADTYPEMISMATCH;
+        */
     }
     return UA_STATUSCODE_GOOD;
 }