[Freeswitch-trunk] [commit] r14043 - in freeswitch/trunk/contrib/mod/endpoints/mod_khomp: . include

FreeSWITCH SVN raulfragoso at freeswitch.org
Mon Jun 29 19:12:56 PDT 2009


Author: raulfragoso
Date: Mon Jun 29 21:12:56 2009
New Revision: 14043

Log:
KhompPvt lacked some proper cleanup during shutdown

Modified:
   freeswitch/trunk/contrib/mod/endpoints/mod_khomp/include/khomp_pvt.h
   freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp

Modified: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/include/khomp_pvt.h
==============================================================================
--- freeswitch/trunk/contrib/mod/endpoints/mod_khomp/include/khomp_pvt.h	(original)
+++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/include/khomp_pvt.h	Mon Jun 29 21:12:56 2009
@@ -79,7 +79,16 @@
 
     static void terminate()
     {
+        switch_mutex_lock(_pvts_mutex);
         
+        for(KhompPvtVector::iterator it_board = _pvts.begin(); it_board != _pvts.end(); it_board++)
+        {
+            for(PvtVectorType::iterator it_channel = it_board->begin(); it_channel != it_board->begin(); it_channel++)
+            {
+                KhompPvt * pvt = *it_channel;
+                delete pvt;
+            }
+        }
     }
 
     K3LAPI::target          _target;

Modified: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp
==============================================================================
--- freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp	(original)
+++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp	Mon Jun 29 21:12:56 2009
@@ -561,6 +561,7 @@
 
     /* Finnish him! */
     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stopping K3L...\n");
+    KhompPvt::terminate();
     Globals::_k3lapi.stop();
     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "the K3L API has been stopped!\n");
     



More information about the Freeswitch-trunk mailing list