- IED server: fixed bug - logs (journals) are added to all logical devices instead of just the parents

pull/314/head
Michael Zillgith 5 years ago
parent f4ee87e486
commit bdaa7bac93

@ -1150,8 +1150,10 @@ createMmsDomainFromIedDevice(MmsMapping* self, LogicalDevice* logicalDevice)
/* add logs (journals) */
Log* log = self->model->logs;
while (log != NULL) {
while (log) {
/* Check if log belongs to this logical device */
if (log->parent->parent == (ModelNode*)logicalDevice) {
char journalName[65];
int nameLength = strlen(log->parent->name) + strlen(log->name);
@ -1171,6 +1173,7 @@ createMmsDomainFromIedDevice(MmsMapping* self, LogicalDevice* logicalDevice)
LinkedList_add(self->logInstances, (void*) logInstance);
}
}
log = log->sibling;
}

@ -84,7 +84,6 @@ MmsDomain_addJournal(MmsDomain* self, const char* name)
LinkedList_add(self->journals, (void*) journal);
}
MmsJournal
MmsDomain_getJournal(MmsDomain* self, const char* name)
{

Loading…
Cancel
Save