From 811b8f45729c446bc3c2e19da938e51c7433bbcd Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Tue, 20 Jan 2015 16:04:46 +0100 Subject: [PATCH] - fixed bug in ModelNode_getChildWithFc function --- src/iec61850/server/model/model.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/iec61850/server/model/model.c b/src/iec61850/server/model/model.c index 89e3512..ac65902 100644 --- a/src/iec61850/server/model/model.c +++ b/src/iec61850/server/model/model.c @@ -491,8 +491,20 @@ ModelNode_getChildWithFc(ModelNode* self, const char* name, FunctionalConstraint } } else { - matchingNode = nextNode; - break; + + if (nextNode->modelType == DataAttributeModelType) { + DataAttribute* da = (DataAttribute*) nextNode; + + if (da->fc == fc) { + matchingNode = nextNode; + break; + } + } + else { + matchingNode = nextNode; + break; + } + } } }