- fixed problems with dynamic model LCBs

- fixed: configuration option CONFIG_MMS_SINGLE_THREADED = 1 together with #define CONFIG_MMS_THREADLESS_MODE = 1 doesn't work
- fixed: In configuration CONFIG_MMS_SINGLE_THREADED = 1 IedServer_destroy will loop endlessly when server was not started before
pull/6/head
Michael Zillgith 9 years ago
parent 9c8da7f94c
commit 3abf055cfc

@ -1,3 +1,9 @@
Changes to version 0.9.2.1
--------------------------
- server: fixed some memory access problens in dynamic model LCB
- server: fixed some minor problems with configuration options
Changes to version 0.9.2
------------------------
- client/server: support for MMS journals and IEC 61850 log service

@ -1,7 +1,7 @@
/*
* ied_server.c
*
* Copyright 2013, 2014, 2015 Michael Zillgith
* Copyright 2013-2016 Michael Zillgith
*
* This file is part of libIEC61850.
*
@ -460,14 +460,16 @@ IedServer_destroy(IedServer self)
MmsServer_destroy(self->mmsServer);
IsoServer_destroy(self->isoServer);
#if (CONFIG_MMS_SINGLE_THREADED == 1)
#if ((CONFIG_MMS_SINGLE_THREADED == 1) && (CONFIG_MMS_THREADLESS_STACK == 0))
/* trigger stopping background task thread */
self->mmsMapping->reportThreadRunning = false;
if (self->mmsMapping->reportThreadRunning) {
self->mmsMapping->reportThreadRunning = false;
/* waiting for thread to finish */
while (self->mmsMapping->reportThreadFinished == false) {
Thread_sleep(10);
/* waiting for thread to finish */
while (self->mmsMapping->reportThreadFinished == false) {
Thread_sleep(10);
}
}
#endif

@ -1,7 +1,7 @@
/*
* dynamic_model.c
*
* Copyright 2014 Michael Zillgith
* Copyright 2014-2016 Michael Zillgith
*
* This file is part of libIEC61850.
*
@ -303,16 +303,17 @@ LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName,
self->name = copyString(name);
self->parent = parent;
self->sibling = NULL;
if (dataSetName)
self->dataSetName = copyString(dataSetName);
else
dataSetName = NULL;
self->dataSetName = NULL;
if (logRef)
self->logRef = copyString(logRef);
else
logRef = NULL;
self->logRef = NULL;
self->trgOps = trgOps;
self->intPeriod = intPeriod;
@ -842,6 +843,15 @@ IedModel_destroy(IedModel* model)
while (lcb != NULL) {
LogControlBlock* nextLcb = lcb->sibling;
if (lcb->name)
GLOBAL_FREEMEM(lcb->name);
if (lcb->dataSetName)
GLOBAL_FREEMEM(lcb->dataSetName);
if (lcb->logRef)
GLOBAL_FREEMEM(lcb->logRef);
GLOBAL_FREEMEM(lcb);
lcb = nextLcb;
@ -853,6 +863,9 @@ IedModel_destroy(IedModel* model)
while (log != NULL) {
Log* nextLog = log->sibling;
if (log->name)
GLOBAL_FREEMEM(log->name);
GLOBAL_FREEMEM(log);
log = nextLog;

Loading…
Cancel
Save