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

FreeSWITCH SVN anthm at freeswitch.org
Thu Jan 22 14:14:37 PST 2009


Author: anthm
Date: Thu Jan 22 16:14:37 2009
New Revision: 11409

Log:
tweak

Modified:
   freeswitch/trunk/src/switch_core_state_machine.c

Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c	(original)
+++ freeswitch/trunk/src/switch_core_state_machine.c	Thu Jan 22 16:14:37 2009
@@ -422,17 +422,23 @@
 						char *arg = NULL;
 						char *expanded = NULL;
 						
-						if ((arg = strchr(cmd, ' '))) {
+						if ((arg = strchr(cmd, ':')) && *(arg+1) == ':') {
 							*arg++ = '\0';
+							*arg++ = '\0';
+						} else {
+							if ((arg = strchr(cmd, ' '))) {
+								*arg++ = '\0';
+							}
 						}
+
 						SWITCH_STANDARD_STREAM(stream);
 						switch_channel_get_variables(session->channel, &stream.param_event);
 						expanded = switch_channel_expand_variables(session->channel, arg);
 						
-
-						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hangup Command %s(%s):\n%s\n", cmd, expanded,
-										  switch_str_nil((char *) stream.data));
 						switch_api_execute(cmd, expanded, use_session, &stream);
+						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hangup Command %s(%s):\n%s\n", cmd, switch_str_nil(expanded),
+										  switch_str_nil((char *) stream.data));
+
 						if (expanded != arg) {
 							switch_safe_free(expanded);
 						}



More information about the Freeswitch-svn mailing list