|
@@ -57,7 +57,7 @@ checkParentReference(UA_Server *server, UA_Session *session, UA_NodeClass nodeCl
|
|
|
const UA_Node *parent = UA_NodeStore_get(server->nodestore, parentNodeId);
|
|
|
if(!parent) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Parent node not found", NULL);
|
|
|
+ "AddNodes: Parent node not found");
|
|
|
return UA_STATUSCODE_BADPARENTNODEIDINVALID;
|
|
|
}
|
|
|
|
|
@@ -66,21 +66,21 @@ checkParentReference(UA_Server *server, UA_Session *session, UA_NodeClass nodeCl
|
|
|
(const UA_ReferenceTypeNode*)UA_NodeStore_get(server->nodestore, referenceTypeId);
|
|
|
if(!referenceType) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Reference type to the parent not found", NULL);
|
|
|
+ "AddNodes: Reference type to the parent not found");
|
|
|
return UA_STATUSCODE_BADREFERENCETYPEIDINVALID;
|
|
|
}
|
|
|
|
|
|
/* Check if the referencetype is a reference type node */
|
|
|
if(referenceType->nodeClass != UA_NODECLASS_REFERENCETYPE) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Reference type to the parent invalid", NULL);
|
|
|
+ "AddNodes: Reference type to the parent invalid");
|
|
|
return UA_STATUSCODE_BADREFERENCETYPEIDINVALID;
|
|
|
}
|
|
|
|
|
|
/* Check that the reference type is not abstract */
|
|
|
if(referenceType->isAbstract == true) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Abstract reference type to the parent not allowed", NULL);
|
|
|
+ "AddNodes: Abstract reference type to the parent not allowed");
|
|
|
return UA_STATUSCODE_BADREFERENCENOTALLOWED;
|
|
|
}
|
|
|
|
|
@@ -94,14 +94,14 @@ checkParentReference(UA_Server *server, UA_Session *session, UA_NodeClass nodeCl
|
|
|
if(!UA_NodeId_equal(referenceTypeId, &subtypeId)) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
"AddNodes: New type node need to have a "
|
|
|
- "HasSubType reference", NULL);
|
|
|
+ "HasSubType reference");
|
|
|
return UA_STATUSCODE_BADREFERENCENOTALLOWED;
|
|
|
}
|
|
|
/* supertype needs to be of the same node type */
|
|
|
if(parent->nodeClass != nodeClass) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
"AddNodes: New type node needs to be of the same "
|
|
|
- "node type as the parent", NULL);
|
|
|
+ "node type as the parent");
|
|
|
return UA_STATUSCODE_BADPARENTNODEIDINVALID;
|
|
|
}
|
|
|
return UA_STATUSCODE_GOOD;
|
|
@@ -113,7 +113,7 @@ checkParentReference(UA_Server *server, UA_Session *session, UA_NodeClass nodeCl
|
|
|
if(!isNodeInTree(server->nodestore, referenceTypeId,
|
|
|
&hierarchicalReference, &subtypeId, 1)) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Reference type is not hierarchical", NULL);
|
|
|
+ "AddNodes: Reference type is not hierarchical");
|
|
|
return UA_STATUSCODE_BADREFERENCETYPEIDINVALID;
|
|
|
}
|
|
|
|
|
@@ -195,7 +195,7 @@ typeCheckVariableNode(UA_Server *server, UA_Session *session,
|
|
|
if(node->valueRank == 0 &&
|
|
|
(!value.hasValue || !value.value.type || UA_Variant_isScalar(&value.value))) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Use a default ValueRank of -2", NULL);
|
|
|
+ "AddNodes: Use a default ValueRank of -2");
|
|
|
UA_RCU_UNLOCK();
|
|
|
retval = UA_Server_writeValueRank(server, node->nodeId, -2);
|
|
|
UA_RCU_LOCK();
|
|
@@ -224,7 +224,7 @@ typeCheckVariableNode(UA_Server *server, UA_Session *session,
|
|
|
/* Fix the variable: If no datatype is given, use the datatype of the vt */
|
|
|
if(UA_NodeId_isNull(&node->dataType)) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session, "AddNodes: "
|
|
|
- "Use a default DataType (from the TypeDefinition)", NULL);
|
|
|
+ "Use a default DataType (from the TypeDefinition)");
|
|
|
UA_RCU_UNLOCK();
|
|
|
retval = UA_Server_writeDataType(server, node->nodeId, vt->dataType);
|
|
|
UA_RCU_LOCK();
|
|
@@ -753,7 +753,7 @@ Service_AddNode_begin(UA_Server *server, UA_Session *session,
|
|
|
/* Check the namespaceindex */
|
|
|
if(item->requestedNewNodeId.nodeId.namespaceIndex >= server->namespacesSize) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Namespace invalid", NULL);
|
|
|
+ "AddNodes: Namespace invalid");
|
|
|
result->statusCode = UA_STATUSCODE_BADNODEIDINVALID;
|
|
|
return;
|
|
|
}
|
|
@@ -775,7 +775,7 @@ Service_AddNode_begin(UA_Server *server, UA_Session *session,
|
|
|
result->statusCode = UA_NodeId_copy(&node->nodeId, &result->addedNodeId);
|
|
|
if(result->statusCode != UA_STATUSCODE_GOOD) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Could not copy the nodeid", NULL);
|
|
|
+ "AddNodes: Could not copy the nodeid");
|
|
|
deleteNode(server, &adminSession, &node->nodeId, true);
|
|
|
}
|
|
|
}
|
|
@@ -806,7 +806,7 @@ Service_AddNode_finish(UA_Server *server, UA_Session *session, const UA_NodeId *
|
|
|
if((node->nodeClass == UA_NODECLASS_VARIABLE || node->nodeClass == UA_NODECLASS_OBJECT) &&
|
|
|
UA_NodeId_isNull(typeDefinition)) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session, "AddNodes: Use a default "
|
|
|
- "TypeDefinition for the Variable/Object", NULL);
|
|
|
+ "TypeDefinition for the Variable/Object");
|
|
|
if(node->nodeClass == UA_NODECLASS_VARIABLE)
|
|
|
typeDefinition = &baseDataVariableType;
|
|
|
else
|
|
@@ -818,7 +818,7 @@ Service_AddNode_finish(UA_Server *server, UA_Session *session, const UA_NodeId *
|
|
|
parentNodeId, referenceTypeId);
|
|
|
if(retval != UA_STATUSCODE_GOOD) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: The parent reference is invalid", NULL);
|
|
|
+ "AddNodes: The parent reference is invalid");
|
|
|
deleteNode(server, &adminSession, nodeId, true);
|
|
|
return retval;
|
|
|
}
|
|
@@ -852,7 +852,7 @@ Service_AddNode_finish(UA_Server *server, UA_Session *session, const UA_NodeId *
|
|
|
const UA_VariableNode *vn = (const UA_VariableNode*)node;
|
|
|
if(!(vn->accessLevel & (UA_ACCESSLEVELMASK_READ))) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Set the AccessLevel to readable by default", NULL);
|
|
|
+ "AddNodes: Set the AccessLevel to readable by default");
|
|
|
UA_Byte readable = vn->accessLevel | (UA_ACCESSLEVELMASK_READ);
|
|
|
UA_Server_writeAccessLevel(server, vn->nodeId, readable);
|
|
|
}
|
|
@@ -870,7 +870,7 @@ Service_AddNode_finish(UA_Server *server, UA_Session *session, const UA_NodeId *
|
|
|
addReference(server, session, &ref_item, &retval);
|
|
|
if(retval != UA_STATUSCODE_GOOD) {
|
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
|
- "AddNodes: Adding reference to parent failed", NULL);
|
|
|
+ "AddNodes: Adding reference to parent failed");
|
|
|
deleteNode(server, &adminSession, nodeId, true);
|
|
|
return retval;
|
|
|
}
|
|
@@ -904,7 +904,7 @@ void Service_AddNodes(UA_Server *server, UA_Session *session,
|
|
|
const UA_AddNodesRequest *request,
|
|
|
UA_AddNodesResponse *response) {
|
|
|
UA_LOG_DEBUG_SESSION(server->config.logger, session,
|
|
|
- "Processing AddNodesRequest", NULL);
|
|
|
+ "Processing AddNodesRequest");
|
|
|
|
|
|
if(request->nodesToAddSize <= 0) {
|
|
|
response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
|
|
@@ -1333,7 +1333,7 @@ void Service_AddReferences(UA_Server *server, UA_Session *session,
|
|
|
const UA_AddReferencesRequest *request,
|
|
|
UA_AddReferencesResponse *response) {
|
|
|
UA_LOG_DEBUG_SESSION(server->config.logger, session,
|
|
|
- "Processing AddReferencesRequest", NULL);
|
|
|
+ "Processing AddReferencesRequest");
|
|
|
response->responseHeader.serviceResult =
|
|
|
UA_Server_processServiceOperations(server, session,
|
|
|
(UA_ServiceOperation) addReference,
|
|
@@ -1425,7 +1425,7 @@ void Service_DeleteNodes(UA_Server *server, UA_Session *session,
|
|
|
const UA_DeleteNodesRequest *request,
|
|
|
UA_DeleteNodesResponse *response) {
|
|
|
UA_LOG_DEBUG_SESSION(server->config.logger, session,
|
|
|
- "Processing DeleteNodesRequest", NULL);
|
|
|
+ "Processing DeleteNodesRequest");
|
|
|
|
|
|
if(request->nodesToDeleteSize == 0) {
|
|
|
response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
|
|
@@ -1536,7 +1536,7 @@ Service_DeleteReferences(UA_Server *server, UA_Session *session,
|
|
|
const UA_DeleteReferencesRequest *request,
|
|
|
UA_DeleteReferencesResponse *response) {
|
|
|
UA_LOG_DEBUG_SESSION(server->config.logger, session,
|
|
|
- "Processing DeleteReferencesRequest", NULL);
|
|
|
+ "Processing DeleteReferencesRequest");
|
|
|
response->responseHeader.serviceResult =
|
|
|
UA_Server_processServiceOperations(server, session,
|
|
|
(UA_ServiceOperation)deleteReference,
|