pull/521/merge
aravindmithra 7 days ago committed by GitHub
commit 2882fe170e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2872,21 +2872,22 @@ IedConnection_getLogicalNodeDirectory(IedConnection self, IedClientError* error,
goto next_element;
int lnNameLen = (int)(fcPos - variableName);
if (strncmp(variableName, logicalNodeName, lnNameLen) == 0)
{
char* fcEndPos = strchr(fcPos + 1, '$');
if (fcEndPos)
if (strlen(logicalNodeName) == lnNameLen){
if (strncmp(variableName, logicalNodeName, lnNameLen) == 0)
{
char* nameEndPos = strchr(fcEndPos + 1, '$');
if (nameEndPos == NULL)
char* fcEndPos = strchr(fcPos + 1, '$');
if (fcEndPos)
{
char* dataObjectName = StringUtils_copyString(fcEndPos + 1);
if (!addToStringSet(lnDirectory, dataObjectName))
GLOBAL_FREEMEM(dataObjectName);
char* nameEndPos = strchr(fcEndPos + 1, '$');
if (nameEndPos == NULL)
{
char* dataObjectName = StringUtils_copyString(fcEndPos + 1);
if (!addToStringSet(lnDirectory, dataObjectName))
GLOBAL_FREEMEM(dataObjectName);
}
}
}
}
@ -3018,10 +3019,11 @@ IedConnection_getLogicalNodeVariables(IedConnection self, IedClientError* error,
if (fcPos)
{
int lnNameLen = (int)(fcPos - variableName);
if (strncmp(variableName, logicalNodeName, lnNameLen) == 0)
{
LinkedList_add(lnDirectory, StringUtils_copyString(fcPos + 1));
if (strlen(logicalNodeName) == lnNameLen){
if (strncmp(variableName, logicalNodeName, lnNameLen) == 0)
{
LinkedList_add(lnDirectory, StringUtils_copyString(fcPos + 1));
}
}
}

Loading…
Cancel
Save