Modified: freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp (16229 => 16230)
--- freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp 2010-01-10 16:52:35 UTC (rev 16229)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp 2010-01-10 17:37:18 UTC (rev 16230)
@@ -385,10 +385,8 @@
goto end;
}
- DEBUGA_GSMOPEN("interface '%s' exist\n", GSMOPEN_P_LOG, the_interface);
globals.GSMOPEN_INTERFACES[interface_id].running = 0;
- DEBUGA_GSMOPEN("interface '%s' exist\n", GSMOPEN_P_LOG, the_interface);
if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
#if 1
#ifdef WIN32
@@ -397,11 +395,10 @@
howmany = write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", howmany);
#endif /* WIN32 */
#endif //0
- ERRORA("HERE will shutdown gsmopen_signaling_thread of '%s'\n", GSMOPEN_P_LOG, the_interface);
+ DEBUGA_GSMOPEN("HERE will shutdown gsmopen_signaling_thread of '%s'\n", GSMOPEN_P_LOG, the_interface);
}
if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
- DEBUGA_GSMOPEN("interface '%s' exist\n", GSMOPEN_P_LOG, the_interface);
#if 0
#ifdef WIN32
if (SendMessage(tech_pvt->GSMopenHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) { // let's the gsmopen_api_thread_func die
@@ -423,7 +420,7 @@
#endif //WIN32
#endif //0
- ERRORA("HERE will shutdown gsmopen_api_thread of '%s'\n", GSMOPEN_P_LOG, the_interface);
+ DEBUGA_GSMOPEN("HERE will shutdown gsmopen_api_thread of '%s'\n", GSMOPEN_P_LOG, the_interface);
}
while (x) {
@@ -431,7 +428,6 @@
switch_yield(50000);
}
- DEBUGA_GSMOPEN("interface '%s' exist\n", GSMOPEN_P_LOG, the_interface);
if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread);
}
@@ -1880,6 +1876,7 @@
//alsa_shutdown(&globals.GSMOPEN_INTERFACES[interface_id]);
+ globals.GSMOPEN_INTERFACES[interface_id].running = 0;
if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
#ifdef WIN32
switch_file_write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
@@ -1983,6 +1980,8 @@
switch_core_session_t *session = NULL;
switch_channel_t *channel = NULL;
+ switch_assert(tech_pvt != NULL);
+ tech_pvt->ib_calls++;
if ((session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
DEBUGA_GSMOPEN("2 SESSION_REQUEST %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(session));
switch_core_session_add_stream(session, NULL);