Skip to content

Commit

Permalink
fix(server): Fix handling of ternary logic NULL in EventFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Sep 29, 2024
1 parent db2da5c commit 697e0da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/ua_subscription_events_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ static UA_Ternary
UA_Ternary_and(UA_Ternary first, UA_Ternary second) {
if(first == UA_TERNARY_FALSE || second == UA_TERNARY_FALSE)
return UA_TERNARY_FALSE;
if(first == UA_TERNARY_TRUE && second == UA_TERNARY_TRUE)
return UA_TERNARY_TRUE;
return UA_TERNARY_NULL;
if(first == UA_TERNARY_NULL || second == UA_TERNARY_NULL)
return UA_TERNARY_NULL;
return UA_TERNARY_TRUE;
}

static UA_Ternary
UA_Ternary_or(UA_Ternary first, UA_Ternary second) {
if(first == UA_TERNARY_TRUE || second == UA_TERNARY_TRUE)
return UA_TERNARY_TRUE;
if(first == UA_TERNARY_NULL || second == UA_TERNARY_NULL)
return UA_TERNARY_TRUE;
return UA_TERNARY_NULL;
return UA_TERNARY_FALSE;
}

Expand Down

0 comments on commit 697e0da

Please sign in to comment.