提交 6a70fa4c authored 作者: Anthony Minessale's avatar Anthony Minessale

fix another regression from 27c6d111 this…

fix another regression from 27c6d111 this probably broke the mad boss extension
上级 b42fdd1c
...@@ -2771,17 +2771,27 @@ SWITCH_DECLARE(switch_status_t) switch_channel_execute_on(switch_channel_t *chan ...@@ -2771,17 +2771,27 @@ SWITCH_DECLARE(switch_status_t) switch_channel_execute_on(switch_channel_t *chan
if (!strncasecmp(var, variable_prefix, strlen(variable_prefix))) { if (!strncasecmp(var, variable_prefix, strlen(variable_prefix))) {
char *arg = NULL; char *arg = NULL;
char *p;
int bg = 0;
x++; x++;
app = switch_core_session_strdup(channel->session, val); app = switch_core_session_strdup(channel->session, val);
if (strstr(app, "::")) { for(p = app; p && *p; p++) {
if (*p == ' ') {
*p++ = '\0';
arg = p;
break;
} else if (*p == ':' && (*(p+1) == ':')) {
bg++;
break;
}
}
if (bg) {
switch_core_session_execute_application_async(channel->session, app, arg); switch_core_session_execute_application_async(channel->session, app, arg);
} else { } else {
if ((arg = strchr(app, ' '))) {
*arg++ = '\0';
}
switch_core_session_execute_application(channel->session, app, arg); switch_core_session_execute_application(channel->session, app, arg);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论