[Freeswitch-svn] [commit] r12177 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Fri Feb 20 07:30:01 PST 2009


Author: anthm
Date: Fri Feb 20 09:30:01 2009
New Revision: 12177

Log:
don't execute apps on channels that are hungup

Modified:
   freeswitch/trunk/src/switch_core_session.c

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Fri Feb 20 09:30:01 2009
@@ -1238,6 +1238,11 @@
 {
 	switch_application_interface_t *application_interface;
 
+	if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is hungup, aborting execution of application: %s\n", app);
+		return SWITCH_STATUS_FALSE;
+	}
+
 	if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app);
 		switch_channel_hangup(session->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);



More information about the Freeswitch-svn mailing list