|
From: <gne...@us...> - 2007-10-21 21:38:12
|
Update of /cvsroot/aolserver/aolserver/nsd In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv28956/nsd Modified Files: queue.c Log Message: protect poolptr condition by mutex Index: queue.c =================================================================== RCS file: /cvsroot/aolserver/aolserver/nsd/queue.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** queue.c 20 Oct 2007 11:57:19 -0000 1.41 --- queue.c 21 Oct 2007 21:38:09 -0000 1.42 *************** *** 503,507 **** Ns_CondBroadcast(&poolPtr->cond); } - Ns_MutexUnlock(&poolPtr->lock); if (poolPtr->queue.wait.num > 0 && poolPtr->threads.idle == 0 && !poolPtr->shutdown) { --- 503,506 ---- *************** *** 510,518 **** that the entries are processed, we recreate a new connection thread. */ - Ns_MutexLock(&poolPtr->lock); poolPtr->threads.current++; poolPtr->threads.idle++; Ns_MutexUnlock(&poolPtr->lock); NsCreateConnThread(poolPtr, 0); /* joinThreads == 0 to avoid deadlock */ } --- 509,518 ---- that the entries are processed, we recreate a new connection thread. */ poolPtr->threads.current++; poolPtr->threads.idle++; Ns_MutexUnlock(&poolPtr->lock); NsCreateConnThread(poolPtr, 0); /* joinThreads == 0 to avoid deadlock */ + } else { + Ns_MutexUnlock(&poolPtr->lock); } |