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:
Anthony Minessale 2008-01-11 16:50:05 +00:00
parent fb39c42d6e
commit 1553168c3c
2 changed files with 15 additions and 15 deletions

View File

@ -946,6 +946,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
channel = switch_core_session_get_channel(session);
switch_channel_clear_flag(channel, CF_BREAK);
switch_assert(application_interface->application_function);
application_interface->application_function(session, arg);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE) == SWITCH_STATUS_SUCCESS) {

View File

@ -337,8 +337,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
if (!switch_strlen_zero(menu->buf)) {
for (ap = menu->actions; ap; ap = ap->next) {
if (!strcmp(menu->buf, ap->bind)) {
char *membuf;
match++;
errs = 0;
if (ap->function) {
@ -376,24 +374,23 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
reps = -1;
status = switch_ivr_menu_execute(session, stack, aptr, obj);
break;
case SWITCH_IVR_ACTION_EXECAPP:{
case SWITCH_IVR_ACTION_EXECAPP:
{
const switch_application_interface_t *application_interface;
char *app_name;
char *app_arg = NULL;
if ((membuf = strdup(aptr))) {
char *app_name = membuf;
char *app_arg = strchr(app_name, ' ');
status = SWITCH_STATUS_FALSE;
if (app_arg) {
*app_arg = '\0';
app_arg++;
if (!switch_strlen_zero(aptr)) {
app_name = switch_core_session_strdup(session, aptr);
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->application_function) {
switch_core_session_exec(session, application_interface, app_arg);
}
}
if ((application_interface = switch_loadable_module_get_application_interface(app_name))) {
switch_core_session_exec(session, application_interface, app_arg);
status = SWITCH_STATUS_SUCCESS;
}
}
}