|
|
|
@ -485,6 +485,8 @@ IsoConnection
|
|
|
|
|
IsoConnection_create(Socket socket, IsoServer isoServer, bool isSingleThread)
|
|
|
|
|
{
|
|
|
|
|
IsoConnection self = (IsoConnection) GLOBAL_CALLOC(1, sizeof(struct sIsoConnection));
|
|
|
|
|
|
|
|
|
|
if (self) {
|
|
|
|
|
self->socket = socket;
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_SUPPORT_TLS == 1)
|
|
|
|
@ -502,7 +504,6 @@ IsoConnection_create(Socket socket, IsoServer isoServer, bool isSingleThread)
|
|
|
|
|
}
|
|
|
|
|
#endif /* (CONFIG_MMS_SUPPORT_TLS == 1) */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self->receiveBuffer = (uint8_t*) GLOBAL_MALLOC(RECEIVE_BUF_SIZE);
|
|
|
|
|
self->sendBuffer = (uint8_t*) GLOBAL_MALLOC(SEND_BUF_SIZE);
|
|
|
|
|
self->msgRcvdHandler = NULL;
|
|
|
|
@ -561,6 +562,7 @@ IsoConnection_create(Socket socket, IsoServer isoServer, bool isSingleThread)
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
@ -592,6 +594,11 @@ IsoConnection_destroy(IsoConnection self)
|
|
|
|
|
if (self->socket != NULL)
|
|
|
|
|
Socket_destroy(self->socket);
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_SINGLE_THREADED != 1) || (CONFIG_MMS_THREADLESS_STACK == 1)
|
|
|
|
|
if (self->handleSet)
|
|
|
|
|
Handleset_destroy(self->handleSet);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (self->cotpConnection) {
|
|
|
|
|
if (self->cotpConnection->handleSet)
|
|
|
|
|
Handleset_destroy(self->cotpConnection->handleSet);
|
|
|
|
|