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

FreeSWITCH SVN raulfragoso at freeswitch.org
Fri Jun 26 23:16:07 PDT 2009


Author: raulfragoso
Date: Sat Jun 27 01:16:07 2009
New Revision: 14009

Log:
Fixed khomp_pvt to have a *REAL* array of static channels;
Included debug in the makefile;

Modified:
   freeswitch/trunk/contrib/mod/endpoints/mod_khomp/Makefile
   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/Makefile
==============================================================================
--- freeswitch/trunk/contrib/mod/endpoints/mod_khomp/Makefile	(original)
+++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/Makefile	Sat Jun 27 01:16:07 2009
@@ -1,6 +1,6 @@
 MODNAME=mod_khomp
 VERBOSE=1
-LOCAL_CFLAGS=-I./include -I./commons -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DK3L_HOSTSYSTEM
+LOCAL_CFLAGS=-I./include -I./commons -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DK3L_HOSTSYSTEM -g -ggdb
 LOCAL_LDFLAGS=-lk3l
 LOCAL_OBJS= ./commons/k3lapi.o ./commons/config_options.o ./commons/format.o ./commons/strings.o
 LOCAL_OBJS+= ./src/globals.o ./src/opt.o ./src/khomp_pvt.o

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	Sat Jun 27 01:16:07 2009
@@ -43,15 +43,19 @@
 
     static void initialize(void)
     {
-
-////        tech_pvt = (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))
-        //for (unsigned dev = 0; dev < Globals::_k3lapi.device_count(); dev++)
-        //{
-         //   _pvts.push_back(std::vector<KhompPvt>());
-
-            //for (unsigned obj = 0; obj < Globals::_k3lapi.channel_count(obj); obj++)
-                //_pvts.back().push_back(KhompPvt(K3LAPI::target(Globals::_k3lapi, K3LAPI::target::CHANNEL, dev, obj)));
-       // }
+        for (unsigned dev = 0; dev < Globals::_k3lapi.device_count(); dev++)
+        {
+           // KhompPvt * tech_pvt;
+            //tech= (KhompPvt *) switch_core_session_alloc(*new_session, sizeof(KhompPvt));
+            _pvts.push_back(std::vector<KhompPvt*>());
+
+            for (unsigned obj = 0; obj < Globals::_k3lapi.channel_count(dev); obj++)
+            {
+                K3LAPI::target tgt(Globals::_k3lapi, K3LAPI::target::CHANNEL, dev, obj);
+                KhompPvt * pvt = new KhompPvt(tgt);
+                _pvts.back().push_back(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	Sat Jun 27 01:16:07 2009
@@ -579,6 +579,7 @@
     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting K3L...\n");
     try {
         Globals::_k3lapi.start();
+        KhompPvt::initialize();
     } catch (K3LAPI::start_failed & e) {
         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "K3L not started. Reason:%s.\n", e.msg.c_str());
         return SWITCH_STATUS_TERM;



More information about the Freeswitch-trunk mailing list