AddReferences method returns too early

The AddRefrences method exists in similar versions in several of the sample node manager classes. The method loops through a list of (external) references and adds them to the designated objects. When obtaining node handles it also checks that the node is valid in the current context. The problem was that it skipped the rest of  the nodes in the list as soon as it found one node that wass not valid. This change ensures that all nodes in the references list are processed.
This commit is contained in:
Oyvind Landsnes
2018-05-24 19:38:53 +02:00
parent d15e38212f
commit 79f4da032c
4 changed files with 4 additions and 4 deletions
@@ -818,7 +818,7 @@ namespace Opc.Ua.Server
if (source == null)
{
return;
continue;
}
// add reference to external target.
@@ -824,7 +824,7 @@ namespace Opc.Ua.Sample
if (source == null)
{
return;
continue;
}
// add reference to external target.
@@ -817,7 +817,7 @@ namespace Opc.Ua.Sample
if (source == null)
{
return;
continue;
}
// add reference to external target.
@@ -928,7 +928,7 @@ namespace Quickstarts
// only support external references to nodes that are stored in memory.
if (source == null || !source.Validated || source.Node == null)
{
return;
continue;
}
// add reference to external target.