[Opalvoip-svn] SF.net SVN: opalvoip:[20792] ptlib/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2008-08-31 06:25:37
|
Revision: 20792 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=20792&view=rev Author: rjongbloed Date: 2008-08-31 06:25:47 +0000 (Sun, 31 Aug 2008) Log Message: ----------- Only do synchronous stop of a timer if it was not already stopped. This avoids some potential deadlocks where timer is stopped elsewhere by the logic. Modified Paths: -------------- ptlib/trunk/src/ptlib/common/osutils.cxx Property Changed: ---------------- ptlib/trunk/ Property changes on: ptlib/trunk ___________________________________________________________________ Modified: svn:mergeinfo - /ptlib/branches/v2_2:20746 + /ptlib/branches/v2_2:20746,20791 Modified: ptlib/trunk/src/ptlib/common/osutils.cxx =================================================================== --- ptlib/trunk/src/ptlib/common/osutils.cxx 2008-08-31 06:22:28 UTC (rev 20791) +++ ptlib/trunk/src/ptlib/common/osutils.cxx 2008-08-31 06:25:47 UTC (rev 20792) @@ -702,10 +702,11 @@ void PTimer::Stop(bool wait) { - state = Stopped; - milliseconds = 0; - - timerList->QueueRequest(PTimerList::RequestType::Stop, this, wait); + if (state != Stopped) { + state = Stopped; + milliseconds = 0; + timerList->QueueRequest(PTimerList::RequestType::Stop, this, wait); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |