[Freeswitch-svn] [commit] r10327 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket
FreeSWITCH SVN
anthm at freeswitch.org
Tue Nov 11 05:32:12 PST 2008
Author: anthm
Date: Tue Nov 11 08:32:11 2008
New Revision: 10327
Log:
update
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Tue Nov 11 08:32:11 2008
@@ -414,12 +414,15 @@
if (switch_test_flag(listener, LFLAG_ASYNC)) {
launch_listener_thread(listener);
switch_ivr_park(session, NULL);
+ return;
} else {
listener_run(NULL, (void *) listener);
}
- while (switch_test_flag(listener, LFLAG_SESSION)) {
- switch_yield(100000);
+ if (switch_channel_get_state(channel) >= CS_HANGUP) {
+ while (switch_test_flag(listener, LFLAG_SESSION)) {
+ switch_yield(100000);
+ }
}
}
@@ -1602,8 +1605,13 @@
switch_mutex_lock(globals.listener_mutex);
prefs.threads++;
switch_mutex_unlock(globals.listener_mutex);
-
+
switch_assert(listener != NULL);
+
+ if ((session = listener->session)) {
+ channel = switch_core_session_get_channel(session);
+ switch_core_session_read_lock(session);
+ }
if (prefs.acl_count && listener->sa && !switch_strlen_zero(listener->remote_ip)) {
uint32_t x = 0;
@@ -1624,13 +1632,7 @@
}
}
}
-
-
- if ((session = listener->session)) {
- channel = switch_core_session_get_channel(session);
- switch_core_session_read_lock(session);
- }
-
+
if (switch_strlen_zero(listener->remote_ip)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connection Open\n");
} else {
More information about the Freeswitch-svn
mailing list