|
|
@ -240,10 +240,10 @@ getNextInvokeId(MmsConnection self)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32_t nextInvokeId;
|
|
|
|
uint32_t nextInvokeId;
|
|
|
|
|
|
|
|
|
|
|
|
Semaphore_wait(self->lastInvokeIdLock);
|
|
|
|
Semaphore_wait(self->nextInvokeIdLock);
|
|
|
|
self->lastInvokeId++;
|
|
|
|
self->nextInvokeId++;
|
|
|
|
nextInvokeId = self->lastInvokeId;
|
|
|
|
nextInvokeId = self->nextInvokeId;
|
|
|
|
Semaphore_post(self->lastInvokeIdLock);
|
|
|
|
Semaphore_post(self->nextInvokeIdLock);
|
|
|
|
|
|
|
|
|
|
|
|
return nextInvokeId;
|
|
|
|
return nextInvokeId;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1353,8 +1353,6 @@ mmsIsoCallback(IsoIndication indication, void* parameter, ByteBuffer* payload)
|
|
|
|
|
|
|
|
|
|
|
|
hasInvokeId = true;
|
|
|
|
hasInvokeId = true;
|
|
|
|
|
|
|
|
|
|
|
|
self->lastInvokeId = invokeId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -1429,7 +1427,7 @@ MmsConnection_createInternal(TLSConfiguration tlsConfig, bool createThread)
|
|
|
|
|
|
|
|
|
|
|
|
self->requestTimeout = CONFIG_MMS_CONNECTION_DEFAULT_TIMEOUT;
|
|
|
|
self->requestTimeout = CONFIG_MMS_CONNECTION_DEFAULT_TIMEOUT;
|
|
|
|
|
|
|
|
|
|
|
|
self->lastInvokeIdLock = Semaphore_create(1);
|
|
|
|
self->nextInvokeIdLock = Semaphore_create(1);
|
|
|
|
self->outstandingCallsLock = Semaphore_create(1);
|
|
|
|
self->outstandingCallsLock = Semaphore_create(1);
|
|
|
|
|
|
|
|
|
|
|
|
self->associationStateLock = Semaphore_create(1);
|
|
|
|
self->associationStateLock = Semaphore_create(1);
|
|
|
@ -1512,7 +1510,7 @@ MmsConnection_destroy(MmsConnection self)
|
|
|
|
if (self->isoParameters != NULL)
|
|
|
|
if (self->isoParameters != NULL)
|
|
|
|
IsoConnectionParameters_destroy(self->isoParameters);
|
|
|
|
IsoConnectionParameters_destroy(self->isoParameters);
|
|
|
|
|
|
|
|
|
|
|
|
Semaphore_destroy(self->lastInvokeIdLock);
|
|
|
|
Semaphore_destroy(self->nextInvokeIdLock);
|
|
|
|
|
|
|
|
|
|
|
|
Semaphore_destroy(self->outstandingCallsLock);
|
|
|
|
Semaphore_destroy(self->outstandingCallsLock);
|
|
|
|
|
|
|
|
|
|
|
|