- MMS client: avoid invoke ID 0 as it is used as return value of client function in case of an error

pull/515/head
Michael Zillgith 2 years ago
parent d658b6ce27
commit 1182cd1771

@ -1,7 +1,7 @@
/* /*
* mms_client_connection.c * mms_client_connection.c
* *
* Copyright 2013-2022 Michael Zillgith * Copyright 2013-2024 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -242,6 +242,10 @@ getNextInvokeId(MmsConnection self)
Semaphore_wait(self->nextInvokeIdLock); Semaphore_wait(self->nextInvokeIdLock);
self->nextInvokeId++; self->nextInvokeId++;
if (self->nextInvokeId == 0)
self->nextInvokeId = 1;
nextInvokeId = self->nextInvokeId; nextInvokeId = self->nextInvokeId;
Semaphore_post(self->nextInvokeIdLock); Semaphore_post(self->nextInvokeIdLock);

Loading…
Cancel
Save