Properly locking the RTP wrappers list during status query.

git-svn-id: http://yate.null.ro/svn/yate/trunk@634 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-01-09 05:56:00 +00:00
parent a49eb5bddf
commit d9c8d73005
1 changed files with 3 additions and 1 deletions

View File

@ -746,13 +746,15 @@ YRTPPlugin::~YRTPPlugin()
void YRTPPlugin::statusParams(String& str)
{
str.append("chans=",",") << s_calls.count();
String tmp;
s_mutex.lock();
str.append("chans=",",") << s_calls.count();
ObjList* l = s_calls.skipNull();
for (; l; l=l->skipNext()) {
YRTPWrapper* w = static_cast<YRTPWrapper*>(l->get());
tmp.append(w->id(),",") << "=" << w->callId();
}
s_mutex.unlock();
str << ";" << tmp;
}