提交 7a1b8669 authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11409 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2b348e7f
...@@ -422,17 +422,23 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) ...@@ -422,17 +422,23 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
char *arg = NULL; char *arg = NULL;
char *expanded = NULL; char *expanded = NULL;
if ((arg = strchr(cmd, ' '))) { if ((arg = strchr(cmd, ':')) && *(arg+1) == ':') {
*arg++ = '\0'; *arg++ = '\0';
*arg++ = '\0';
} else {
if ((arg = strchr(cmd, ' '))) {
*arg++ = '\0';
}
} }
SWITCH_STANDARD_STREAM(stream); SWITCH_STANDARD_STREAM(stream);
switch_channel_get_variables(session->channel, &stream.param_event); switch_channel_get_variables(session->channel, &stream.param_event);
expanded = switch_channel_expand_variables(session->channel, arg); 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_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) { if (expanded != arg) {
switch_safe_free(expanded); switch_safe_free(expanded);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论