Parcourir la source

Merge branch 'master' into noglobal

Conflicts:
	CMakeLists.txt
	examples/logger_stdout.c
	examples/logger_stdout.h
	examples/opcuaServer.c
	src/util/ua_log.h
Julius Pfrommer il y a 10 ans
Parent
commit
d8f81a29f7

+ 0 - 1
examples/opcuaServer.c

@@ -1,5 +1,4 @@
 #include <stdio.h>
-
 #ifndef WIN32
 #include <sys/mman.h>
 #include <sys/wait.h>

+ 3 - 3
src/server/ua_services_attribute.c

@@ -99,7 +99,7 @@ static UA_DataValue service_read_node(UA_Server *server, const UA_ReadValueId *i
 		break;
 
 	case UA_ATTRIBUTEID_ISABSTRACT:
-		CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE);
+		CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE | UA_NODECLASS_OBJECTTYPE | UA_NODECLASS_VARIABLETYPE | UA_NODECLASS_DATATYPE);
 		v.encodingMask = UA_DATAVALUE_ENCODINGMASK_VARIANT;
 		retval |=
 		    UA_Variant_copySetValue(&v.value, &UA_.types[UA_BOOLEAN],
@@ -128,14 +128,14 @@ static UA_DataValue service_read_node(UA_Server *server, const UA_ReadValueId *i
 		break;
 
 	case UA_ATTRIBUTEID_EVENTNOTIFIER:
-		CHECK_NODECLASS(UA_NODECLASS_VIEW);
+		CHECK_NODECLASS(UA_NODECLASS_VIEW | UA_NODECLASS_OBJECT);
 		v.encodingMask = UA_DATAVALUE_ENCODINGMASK_VARIANT;
 		retval |= UA_Variant_copySetValue(&v.value, &UA_.types[UA_BYTE],
 		                                  &((UA_ViewNode *)node)->eventNotifier);
 		break;
 
 	case UA_ATTRIBUTEID_VALUE:
-		CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
+		CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
 		v.encodingMask = UA_DATAVALUE_ENCODINGMASK_VARIANT;
 		// TODO: Ensure that the borrowed value is not freed prematurely (multithreading)
 		/* retval |= UA_Variant_borrowSetValue(&v.value, &UA_.types[UA_VARIANT], */

+ 2 - 0
src/ua_types_encoding_binary.c

@@ -411,6 +411,7 @@ UA_Int32 UA_NodeId_calcSizeBinary(UA_NodeId const *p) {
 
 		default:
 			UA_assert(UA_FALSE); // this must never happen
+			break;
 		}
 	}
 	return length;
@@ -522,6 +523,7 @@ UA_Int32 UA_NodeId_decodeBinary(UA_ByteString const *src, UA_UInt32 *offset, UA_
 
 	default:
 		retval = UA_ERROR; // the client sends an encodingByte we do not recognize
+		break;
 	}
 	return retval;
 }