Lock waiting message list while cleaning it up.

Increased level of debugging message when needing to clean up waiting list.


git-svn-id: http://yate.null.ro/svn/yate/trunk@2385 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-12-02 21:42:10 +00:00
parent d0cd523d34
commit a54cd57e23
1 changed files with 3 additions and 1 deletions

View File

@ -785,10 +785,12 @@ bool ExtModReceiver::flush()
for (; p; p=p->next())
p->setDelete(false);
}
Lock lock(this);
if (m_waiting.get()) {
DDebug(DebugAll,"ExtModReceiver releasing %u pending messages [%p]",
Debug(DebugInfo,"ExtModReceiver releasing %u pending messages [%p]",
m_waiting.count(),this);
m_waiting.clear();
lock.drop();
Thread::yield();
return true;
}