Added mutex locks around some likely harmless assignments.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5289 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
adcdd500a9
commit
cb0d669c39
|
@ -723,8 +723,10 @@ RefPointer<MGCPMessage> MGCPWrapper::sendSync(MGCPMessage* mm, const SocketAddr&
|
|||
}
|
||||
u_int64_t t2 = Time::msecNow();
|
||||
MGCPTransaction* tr = s_engine->sendCommand(mm,address);
|
||||
s_mutex.lock();
|
||||
tr->userData(m_this);
|
||||
m_tr = tr;
|
||||
s_mutex.unlock();
|
||||
while (m_tr == tr)
|
||||
Thread::idle();
|
||||
RefPointer<MGCPMessage> tmp = m_msg;
|
||||
|
@ -1596,8 +1598,11 @@ bool MGCPCircuit::sendAsync(MGCPMessage* mm, bool notify)
|
|||
if (ep) {
|
||||
MGCPTransaction* tr = s_engine->sendCommand(mm,ep->address());
|
||||
if (tr) {
|
||||
if (notify)
|
||||
if (notify) {
|
||||
s_mutex.lock();
|
||||
tr->userData(m_this);
|
||||
s_mutex.unlock();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue