Unlock the driver while updating channels to avoid possible deadlocks.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1505 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
f304ebd6bb
commit
7f62946415
|
@ -1506,7 +1506,7 @@ bool Client::action(Window* wnd, const String& name)
|
|||
page = 0;
|
||||
String helpFile = Engine::config().getValue("client","helpbase");
|
||||
if (helpFile.null())
|
||||
helpFile << Engine::sharedPath() << Engine::pathSeparator() << "help";
|
||||
helpFile << Engine::modulePath() << Engine::pathSeparator() << "help";
|
||||
if (!helpFile.endsWith(Engine::pathSeparator()))
|
||||
helpFile << Engine::pathSeparator();
|
||||
helpFile << page << ".yhlp";
|
||||
|
@ -2428,12 +2428,14 @@ void ClientDriver::msgTimer(Message& msg)
|
|||
Driver::msgTimer(msg);
|
||||
if (Client::self()) {
|
||||
Client::self()->lockOther();
|
||||
ObjList* l = &channels();
|
||||
for (; l; l = l->next()) {
|
||||
ClientChannel* cc = static_cast<ClientChannel*>(l->get());
|
||||
if (cc) {
|
||||
ListIterator iter(channels());
|
||||
while (ClientChannel* cc = static_cast<ClientChannel*>(iter.get())) {
|
||||
if (cc->ref()) {
|
||||
unlock();
|
||||
cc->update(false);
|
||||
Client::self()->setChannelInternal(cc);
|
||||
cc->deref();
|
||||
lock();
|
||||
}
|
||||
}
|
||||
Client::self()->unlockOther();
|
||||
|
|
Loading…
Reference in New Issue