fix for FSCORE-85
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7176 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
fb39c42d6e
commit
1553168c3c
|
@ -946,6 +946,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
switch_channel_clear_flag(channel, CF_BREAK);
|
switch_channel_clear_flag(channel, CF_BREAK);
|
||||||
|
|
||||||
|
switch_assert(application_interface->application_function);
|
||||||
|
|
||||||
application_interface->application_function(session, arg);
|
application_interface->application_function(session, arg);
|
||||||
|
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
|
|
@ -337,8 +337,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
|
||||||
if (!switch_strlen_zero(menu->buf)) {
|
if (!switch_strlen_zero(menu->buf)) {
|
||||||
for (ap = menu->actions; ap; ap = ap->next) {
|
for (ap = menu->actions; ap; ap = ap->next) {
|
||||||
if (!strcmp(menu->buf, ap->bind)) {
|
if (!strcmp(menu->buf, ap->bind)) {
|
||||||
char *membuf;
|
|
||||||
|
|
||||||
match++;
|
match++;
|
||||||
errs = 0;
|
errs = 0;
|
||||||
if (ap->function) {
|
if (ap->function) {
|
||||||
|
@ -376,24 +374,23 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
|
||||||
reps = -1;
|
reps = -1;
|
||||||
status = switch_ivr_menu_execute(session, stack, aptr, obj);
|
status = switch_ivr_menu_execute(session, stack, aptr, obj);
|
||||||
break;
|
break;
|
||||||
case SWITCH_IVR_ACTION_EXECAPP:{
|
case SWITCH_IVR_ACTION_EXECAPP:
|
||||||
|
{
|
||||||
const switch_application_interface_t *application_interface;
|
const switch_application_interface_t *application_interface;
|
||||||
|
char *app_name;
|
||||||
|
char *app_arg = NULL;
|
||||||
|
|
||||||
if ((membuf = strdup(aptr))) {
|
status = SWITCH_STATUS_FALSE;
|
||||||
char *app_name = membuf;
|
|
||||||
char *app_arg = strchr(app_name, ' ');
|
|
||||||
|
|
||||||
if (app_arg) {
|
if (!switch_strlen_zero(aptr)) {
|
||||||
*app_arg = '\0';
|
app_name = switch_core_session_strdup(session, aptr);
|
||||||
app_arg++;
|
if ((app_arg = strchr(app_name, ' '))) {
|
||||||
|
*app_arg++ = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app_name && app_arg) {
|
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
|
||||||
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
|
switch_core_session_exec(session, application_interface, app_arg);
|
||||||
if (application_interface->application_function) {
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
switch_core_session_exec(session, application_interface, app_arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue