Skip to content

Commit

Permalink
OPCFoundation#2656 Fix for - Session is not provided by ClearChangeMa…
Browse files Browse the repository at this point in the history
…sks when a change is notified
  • Loading branch information
Filippo-Oliva-ABB committed Sep 24, 2024
1 parent 36dbdd3 commit 1c96145
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Libraries/Opc.Ua.Server/Diagnostics/MonitoredNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,31 @@ public void OnMonitoredNodeChanged(ISystemContext context, NodeState node, NodeS

if (monitoredItem.AttributeId == Attributes.Value && (changes & NodeStateChangeMasks.Value) != 0)
{
QueueValue(context, node, monitoredItem);
ServerSystemContext serverSystemContext;
if ((serverSystemContext = (context as ServerSystemContext)) != null)
{
ServerSystemContext context2 = serverSystemContext.Copy(new OperationContext(monitoredItem.Session, monitoredItem.DiagnosticsMasks));
QueueValue(context2, node, monitoredItem);
}
else
{
QueueValue(context, node, monitoredItem);
}
continue;
}

if (monitoredItem.AttributeId != Attributes.Value && (changes & NodeStateChangeMasks.NonValue) != 0)
{
QueueValue(context, node, monitoredItem);
ServerSystemContext serverSystemContext2;
if ((serverSystemContext2 = (context as ServerSystemContext)) != null)
{
ServerSystemContext context3 = serverSystemContext2.Copy(new OperationContext(monitoredItem.Session, monitoredItem.DiagnosticsMasks));
QueueValue(context3, node, monitoredItem);
}
else
{
QueueValue(context, node, monitoredItem);
}
continue;
}
}
Expand Down

0 comments on commit 1c96145

Please sign in to comment.