[Freeswitch-trunk] [freeswitch] FreeSWITCH Source branch master updated. git2svn-syncpoint-master-1681-g93b85b5

git at svn.freeswitch.org git at svn.freeswitch.org
Tue Feb 1 22:55:23 MSK 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FreeSWITCH Source".

The branch, master has been updated
       via  93b85b5a4c8abff3be692288176a40fda5b13c3f (commit)
       via  d72cde9b76a856cf002366300bea02c26db44ffb (commit)
      from  6a524a1d567f9e73d10d14067212bda5f67b7ffb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 93b85b5a4c8abff3be692288176a40fda5b13c3f
Merge: 6a524a1 d72cde9
Author: David Yat Sin <dyatsin at sangoma.com>
Date:   Tue Feb 1 14:55:06 2011 -0500

    Merge branch 'master' of git.freeswitch.org:freeswitch


commit d72cde9b76a856cf002366300bea02c26db44ffb
Author: Anthony Minessale <anthm at freeswitch.org>
Date:   Tue Feb 1 13:39:36 2011 -0600

    only execute execute_on_[answer|media|ring] async when its expressed in app::arg form vs 'app arg form'

diff --git a/src/switch_channel.c b/src/switch_channel.c
index de472a9..70b1879 100644
--- a/src/switch_channel.c
+++ b/src/switch_channel.c
@@ -2595,14 +2595,15 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_ring_ready_value(swi
 		if (var) {
 			char *arg = NULL;
 			app = switch_core_session_strdup(channel->session, var);
-			if ((arg = strchr(app, ' '))) {
-				*arg++ = '\0';
-			}
 
-			if (switch_core_session_in_thread(channel->session)) {
-				switch_core_session_execute_application(channel->session, app, arg);
-			} else {
+			if (strstr(app, "::")) {
 				switch_core_session_execute_application_async(channel->session, app, arg);
+			} else {
+				if ((arg = strchr(app, ' '))) {
+					*arg++ = '\0';
+				}
+				
+				switch_core_session_execute_application(channel->session, app, arg);
 			}
 		}
 
@@ -2653,14 +2654,16 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
 			 (var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE))) && !zstr(var)) {
 			char *arg = NULL;
 			app = switch_core_session_strdup(channel->session, var);
-			if ((arg = strchr(app, ' '))) {
-				*arg++ = '\0';
-			}
 
-			if (switch_core_session_in_thread(channel->session)) {
-				switch_core_session_execute_application(channel->session, app, arg);
-			} else {
+
+			if (strstr(app, "::")) {
 				switch_core_session_execute_application_async(channel->session, app, arg);
+			} else {
+				if ((arg = strchr(app, ' '))) {
+					*arg++ = '\0';
+				}
+				
+				switch_core_session_execute_application(channel->session, app, arg);
 			}
 		}
 
@@ -2825,27 +2828,17 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
 		 (!switch_channel_test_flag(channel, CF_EARLY_MEDIA) && (var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_MEDIA_VARIABLE))))
 		&& !zstr(var)) {
 		char *arg = NULL;
-		char *colon = NULL;
 
 		app = switch_core_session_strdup(channel->session, var);
 
-		arg = strchr(app, ' ');
-		colon = strchr(app, ':');
-		if (colon && (!arg || arg > colon) && *(colon + 1) == ':') {
-			switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "%s execute on answer: %s (BROADCAST)\n", channel->name, app);
-			switch_ivr_broadcast(switch_core_session_get_uuid(channel->session), app, SMF_NONE);
+		if (strstr(app, "::")) {
+			switch_core_session_execute_application_async(channel->session, app, arg);
 		} else {
-			if (arg) {
+			if ((arg = strchr(app, ' '))) {
 				*arg++ = '\0';
 			}
-			switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)\n", channel->name, app,
-							  switch_str_nil(arg));
-
-			if (switch_core_session_in_thread(channel->session)) {
-				switch_core_session_execute_application(channel->session, app, arg);
-			} else {
-				switch_core_session_execute_application_async(channel->session, app, arg);
-			}
+			
+			switch_core_session_execute_application(channel->session, app, arg);
 		}
 	}
 

-----------------------------------------------------------------------

Summary of changes:
 src/switch_channel.c |   47 ++++++++++++++++++++---------------------------
 1 files changed, 20 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
FreeSWITCH Source



More information about the Freeswitch-trunk mailing list