- IEC 61850 server: functions IedModel_getModelNodeByShortObjectReference and IedModel_getModelNodeByObjectReference now also work with object references that have only LD part

pull/72/head
Michael Zillgith 7 years ago
parent 3f07176dc3
commit 6618093f7a

@ -302,15 +302,16 @@ IedModel_getModelNodeByObjectReference(IedModel* model, const char* objectRefere
char* separator = strchr(objRef, '/');
if (separator == NULL)
return NULL;
if (separator != NULL)
*separator = 0;
LogicalDevice* ld = IedModel_getDevice(model, objRef);
if (ld == NULL) return NULL;
if ((separator == NULL) || (*(separator + 1) == 0))
return (ModelNode*) ld;
return ModelNode_getChild((ModelNode*) ld, separator + 1);
}
@ -350,9 +351,7 @@ IedModel_getModelNodeByShortObjectReference(IedModel* model, const char* objectR
char* separator = strchr(objRef, '/');
if (separator == NULL)
return NULL;
if (separator != NULL)
*separator = 0;
char ldName[65];
@ -363,6 +362,9 @@ IedModel_getModelNodeByShortObjectReference(IedModel* model, const char* objectR
if (ld == NULL) return NULL;
if ((separator == NULL) || (*(separator + 1) == 0))
return (ModelNode*) ld;
return ModelNode_getChild((ModelNode*) ld, separator + 1);
}

Loading…
Cancel
Save