Fixed bug: lock transaction list mutex during local id generation to avoid duplicates.

git-svn-id: http://yate.null.ro/svn/yate/trunk@6330 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2018-11-23 10:05:57 +00:00
parent c5b6e8ae77
commit 8038fbe8e4
1 changed files with 2 additions and 0 deletions

View File

@ -515,8 +515,10 @@ SS7TCAPMessage* SS7TCAP::dequeue()
void SS7TCAP::allocTransactionID(String& str)
{
m_transactionsMtx.lock();
u_int32_t tmp = m_idsPool;
m_idsPool++;
m_transactionsMtx.unlock();
unsigned char buff[sizeof(tmp)];
int len = sizeof(tmp);
for (int index = len - 1; index >= 0; index--) {