Module: sems Branch: 1.4 Commit: f62bfd1d2caf5f12ab1b9e2401c5689779d7ab83 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=f62bfd1d2caf5f12ab1b9e2401c5689779d7ab83
Author: Raphael Coeffic <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Mon Jun 13 18:16:20 2011 +0200 avoid to call AmThread::on_stop() when the thread is already stopped. --- core/AmThread.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/core/AmThread.cpp b/core/AmThread.cpp index ad08f7d..887963e 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -143,6 +143,11 @@ void AmThread::stop() { _m_td.lock(); + if(is_stopped()){ + _m_td.unlock(); + return; + } + // gives the thread a chance to clean up DBG("Thread %lu (%lu) calling on_stop, give it a chance to clean up.\n", (unsigned long int) _pid, (unsigned long int) _td); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
