|
|
|
@ -374,6 +374,7 @@ handleIsoConnections(IsoServer self)
|
|
|
|
|
if ((connectionSocket = ServerSocket_accept((ServerSocket) self->serverSocket)) != NULL) {
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1)
|
|
|
|
|
if (self->maxConnections > -1) {
|
|
|
|
|
if (private_IsoServer_getConnectionCounter(self) >= self->maxConnections) {
|
|
|
|
|
if (DEBUG_ISO_SERVER)
|
|
|
|
|
printf("ISO_SERVER: maximum number of connections reached -> reject connection attempt.\n");
|
|
|
|
@ -382,6 +383,7 @@ handleIsoConnections(IsoServer self)
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif /* (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) */
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS != -1)
|
|
|
|
@ -427,6 +429,7 @@ handleIsoConnectionsThreadless(IsoServer self)
|
|
|
|
|
if ((connectionSocket = ServerSocket_accept((ServerSocket) self->serverSocket)) != NULL) {
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1)
|
|
|
|
|
if (self->maxConnections > -1) {
|
|
|
|
|
if (private_IsoServer_getConnectionCounter(self) >= self->maxConnections) {
|
|
|
|
|
if (DEBUG_ISO_SERVER)
|
|
|
|
|
printf("ISO_SERVER: maximum number of connections reached -> reject connection attempt.\n");
|
|
|
|
@ -435,6 +438,7 @@ handleIsoConnectionsThreadless(IsoServer self)
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif /* (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) */
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS != -1)
|
|
|
|
@ -522,6 +526,10 @@ IsoServer_create(TLSConfiguration tlsConfiguration)
|
|
|
|
|
self->openClientConnections = LinkedList_create();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1)
|
|
|
|
|
self->maxConnections = CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_THREADLESS_STACK != 1) && (CONFIG_MMS_SINGLE_THREADED == 0)
|
|
|
|
|
self->connectionCounterMutex = Semaphore_create(1);
|
|
|
|
|
self->openClientConnectionsMutex = Semaphore_create(1);
|
|
|
|
|