Module: sems Branch: master Commit: 518bbb2a0d2b29c2df34108f86c5980c9084c382 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=518bbb2a0d2b29c2df34108f86c5980c9084c382
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[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
