Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): Problems with event subscription in reduced namespace #6298

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(server): The order of the clause validation was adjusted; there w…
…ere problems when using the reduced namespace.
  • Loading branch information
nogryy committed Feb 21, 2024
commit f501f6c35bd342b44946e5ae9c37df92f8c6c6d8
10 changes: 5 additions & 5 deletions src/server/ua_subscription_events_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,11 @@ UA_SimpleAttributeOperandValidation(UA_Server *server,
if(UA_NodeId_isNull(&sao->typeDefinitionId))
return UA_STATUSCODE_BADTYPEDEFINITIONINVALID;

/* If the BrowsePath is empty, the Node is the instance of the
* TypeDefinition. (Part 4, 7.4.4.5) */
if(sao->browsePathSize == 0)
return UA_STATUSCODE_GOOD;

/* EventType is a subtype of BaseEventType? */
UA_NodeId baseEventTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_BASEEVENTTYPE);
if(!isNodeInTree_singleRef(server, &sao->typeDefinitionId,
Expand All @@ -1135,11 +1140,6 @@ UA_SimpleAttributeOperandValidation(UA_Server *server,
if(sao->attributeId == 0 || sao->attributeId >= 28)
return UA_STATUSCODE_BADATTRIBUTEIDINVALID;

/* If the BrowsePath is empty, the Node is the instance of the
* TypeDefinition. (Part 4, 7.4.4.5) */
if(sao->browsePathSize == 0)
return UA_STATUSCODE_GOOD;

/* BrowsePath contains empty BrowseNames? */
for(size_t j = 0; j < sao->browsePathSize; ++j) {
if(UA_QualifiedName_isNull(&sao->browsePath[j]))
Expand Down
Loading