소스 검색

Datatypes are compatible if they are of the same type

Stefan Profanter 7 년 전
부모
커밋
523c62e172
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/server/ua_services_attribute.c

+ 4 - 0
src/server/ua_services_attribute.c

@@ -83,6 +83,10 @@ compatibleDataType(UA_Server *server, const UA_NodeId *dataType,
     if(UA_NodeId_isNull(constraintDataType))
         return true;
 
+    /* Same datatypes */
+    if (UA_NodeId_equal(dataType, constraintDataType))
+        return true;
+
     /* Variant allows any subtype */
     if(UA_NodeId_equal(constraintDataType, &UA_TYPES[UA_TYPES_VARIANT].typeId))
         return true;