Skip to content

Commit

Permalink
Merge pull request #2466 from OPCFoundation/releasetag
Browse files Browse the repository at this point in the history
Cherry pick hotfix and tag as 1.5.372 release.
  • Loading branch information
mregen committed Jan 18, 2024
2 parents 8c34076 + 4ca0cd2 commit 11244de
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .azurepipelines/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
arguments: '${{ variables.DotCliCommandline }} --configuration ${{ parameters.configuration }}'
- task: DotNetCoreCLI@2
displayName: Test ${{ parameters.configuration }}
timeoutInMinutes: 45
timeoutInMinutes: 60
inputs:
command: test
projects: '**/*.Tests.csproj'
Expand Down
2 changes: 1 addition & 1 deletion .azurepipelines/testcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
arguments: '${{ variables.DotCliCommandline }} --configuration ${{ parameters.configuration }}'
- task: DotNetCoreCLI@2
displayName: Test ${{ parameters.framework }}
timeoutInMinutes: 45
timeoutInMinutes: 60
inputs:
command: test
projects: 'UA Core Library.sln'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ protected virtual void AddPredefinedNode(ISystemContext context, NodeState node)
LocalReference referenceToRemove = new LocalReference(
(NodeId)reference.TargetId,
reference.ReferenceTypeId,
reference.IsInverse,
!reference.IsInverse,
node.NodeId);

referencesToRemove.Add(referenceToRemove);
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Server/Diagnostics/CustomNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ protected virtual void AddPredefinedNode(ISystemContext context, NodeState node)
LocalReference referenceToRemove = new LocalReference(
(NodeId)reference.TargetId,
reference.ReferenceTypeId,
reference.IsInverse,
!reference.IsInverse,
node.NodeId);

referencesToRemove.Add(referenceToRemove);
Expand Down
3 changes: 1 addition & 2 deletions Libraries/Opc.Ua.Server/NodeManager/MasterNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,7 @@ public void RemoveReferences(List<LocalReference> referencesToRemove)
LocalReference reference = referencesToRemove[ii];

// find source node.
INodeManager nodeManager = null;
object sourceHandle = GetManagerHandle(reference.SourceId, out nodeManager);
object sourceHandle = GetManagerHandle(reference.SourceId, out INodeManager nodeManager);

if (sourceHandle == null)
{
Expand Down
47 changes: 9 additions & 38 deletions Stack/Opc.Ua.Core/Stack/State/NodeState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2347,10 +2347,7 @@ public void SetAreEventsMonitored(ISystemContext context, bool areEventsMonitore
/// <param name="e">The event to report.</param>
public virtual void ReportEvent(ISystemContext context, IFilterTarget e)
{
if (OnReportEvent != null)
{
OnReportEvent(context, this, e);
}
OnReportEvent?.Invoke(context, this, e);

// report event to notifier sources.
if (m_notifiers != null)
Expand Down Expand Up @@ -2498,10 +2495,7 @@ public virtual void RemoveNotifier(ISystemContext context, NodeState target, boo
/// <param name="includeChildren">Whether to recursively report events for the children.</param>
public virtual void ConditionRefresh(ISystemContext context, List<IFilterTarget> events, bool includeChildren)
{
if (OnConditionRefresh != null)
{
OnConditionRefresh(context, this, events);
}
OnConditionRefresh?.Invoke(context, this, events);

if (includeChildren)
{
Expand Down Expand Up @@ -2581,15 +2575,9 @@ public void ClearChangeMasks(ISystemContext context, bool includeChildren)

if (m_changeMasks != NodeStateChangeMasks.None)
{
if (OnStateChanged != null)
{
OnStateChanged(context, this, m_changeMasks);
}
OnStateChanged?.Invoke(context, this, m_changeMasks);

if (StateChanged != null)
{
StateChanged(context, this, m_changeMasks);
}
StateChanged?.Invoke(context, this, m_changeMasks);

m_changeMasks = NodeStateChangeMasks.None;
}
Expand Down Expand Up @@ -2912,10 +2900,7 @@ public virtual bool Validate(ISystemContext context)

PopulateBrowser(context, browser);

if (OnPopulateBrowser != null)
{
OnPopulateBrowser(context, this, browser);
}
OnPopulateBrowser?.Invoke(context, this, browser);

return browser;
}
Expand Down Expand Up @@ -4472,25 +4457,11 @@ public void RemoveChild(BaseInstanceState child)
return false;
}

NodeStateReference sourceRef = null;

foreach (var m_refKey in m_references.Keys)
if (m_references.Remove(new NodeStateReference(referenceTypeId, isInverse, targetId)))
{
if (m_refKey.TargetId != null && m_refKey.TargetId.IdentifierText.Equals(targetId.IdentifierText))
{
sourceRef = m_refKey as NodeStateReference;
break;
}
}

if (sourceRef != null)
{
if (m_references.Remove(sourceRef))
{
m_changeMasks |= NodeStateChangeMasks.References;
OnReferenceRemoved?.Invoke(this, referenceTypeId, isInverse, targetId);
return true;
}
m_changeMasks |= NodeStateChangeMasks.References;
OnReferenceRemoved?.Invoke(this, referenceTypeId, isInverse, targetId);
return true;
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.5.372-rc2",
"version": "1.5.372",
"versionHeightOffset": 106,
"nugetPackageVersion": {
"semVer": 2
Expand Down

0 comments on commit 11244de

Please sign in to comment.