- IEC 61850/MMS: allow using default port in non-threaded mode

pull/143/head
Michael Zillgith 8 years ago
parent 570ca71570
commit afd374397d

@ -113,7 +113,7 @@ IedServer_setFilestoreBasepath(IedServer self, const char* basepath);
* \brief Start handling client connections * \brief Start handling client connections
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
* \param tcpPort the TCP port the server is listening * \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port)
*/ */
void void
IedServer_start(IedServer self, int tcpPort); IedServer_start(IedServer self, int tcpPort);
@ -134,7 +134,7 @@ IedServer_stop(IedServer self);
* be called periodically. * be called periodically.
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
* \param tcpPort the TCP port the server is listening * \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port)
*/ */
void void
IedServer_startThreadless(IedServer self, int tcpPort); IedServer_startThreadless(IedServer self, int tcpPort);

@ -394,7 +394,10 @@ void
MmsServer_startListeningThreadless(MmsServer self, int tcpPort) MmsServer_startListeningThreadless(MmsServer self, int tcpPort)
{ {
IsoServer_setConnectionHandler(self->isoServer, isoConnectionIndicationHandler, (void*) self); IsoServer_setConnectionHandler(self->isoServer, isoConnectionIndicationHandler, (void*) self);
if (tcpPort != -1)
IsoServer_setTcpPort(self->isoServer, tcpPort); IsoServer_setTcpPort(self->isoServer, tcpPort);
IsoServer_startListeningThreadless(self->isoServer); IsoServer_startListeningThreadless(self->isoServer);
} }

Loading…
Cancel
Save