- IED server: cancel outstanding control tasks when client closes connection (to prevent blocking the connection for waiting time activated controls)

pull/179/head
Michael Zillgith 6 years ago
parent 7cb69c983a
commit 2e9761c541

@ -1357,12 +1357,10 @@ IedServer_handleWriteAccess(IedServer self, DataAttribute* dataAttribute, WriteA
if (dataAttribute == NULL) {
if (DEBUG_IED_SERVER)
printf("IED_SERVER: IedServer_handleWriteAccess - dataAttribute == NULL!\n");
/* Cause a trap */
*((volatile int*) NULL) = 1;
}
else {
MmsMapping_installWriteAccessHandler(self->mmsMapping, dataAttribute, handler, parameter);
}
}
void

@ -51,6 +51,7 @@ IedServerConfig_create()
self->maxDataSetEntries = CONFIG_MMS_MAX_NUMBER_OF_DATA_SET_MEMBERS;
self->enableLogService = true;
self->edition = IEC_61850_EDITION_2;
self->maxMmsConnections = 5;
}
return self;

@ -2404,12 +2404,6 @@ mmsConnectionHandler(void* parameter, MmsServerConnection connection, MmsServerE
private_IedServer_removeClientConnection(self->iedServer, clientConnection);
#if (CONFIG_MMS_THREADLESS_STACK != 1)
/* wait until control threads are finished */
while (private_ClientConnection_getTasksCount(clientConnection) > 0)
Thread_sleep(10);
#endif /* (CONFIG_MMS_THREADLESS_STACK != 1) */
#if (CONFIG_IEC61850_REPORT_SERVICE == 1)
Reporting_deactivateReportsForConnection(self, connection);
#endif

Loading…
Cancel
Save