[commit] r7183 - in freeswitch/trunk: conf/autoload_configs src
Author: anthm Date: Fri Jan 11 22:40:25 2008 New Revision: 7183 Modified: freeswitch/trunk/conf/autoload_configs/ivr.conf.xml freeswitch/trunk/src/switch_ivr_menu.c Log: update fix to FSCORE-85 Modified: freeswitch/trunk/conf/autoload_configs/ivr.conf.xml ============================================================================== --- freeswitch/trunk/conf/autoload_configs/ivr.conf.xml (original) +++ freeswitch/trunk/conf/autoload_configs/ivr.conf.xml Fri Jan 11 22:40:25 2008 @@ -9,7 +9,7 @@ <entry action="menu-exit" digits="*"/> <entry action="menu-play-sound" digits="1" params="soundfiles/features.wav"/> <entry action="menu-sub" digits="2" param="demo2"/> - <entry action="menu-exec-api" digits="3" param="bridge sofia/$${domain}/888@conference.freeswtich.org"/> + <entry action="menu-exec-app" digits="3" param="bridge sofia/$${domain}/888@conference.freeswtich.org"/> <entry action="menu-call-transfer" digits="4" param="888"/> <entry action="menu-sub" digits="8" param="menu8"/> </menu> Modified: freeswitch/trunk/src/switch_ivr_menu.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_menu.c (original) +++ freeswitch/trunk/src/switch_ivr_menu.c Fri Jan 11 22:40:25 2008 @@ -489,8 +489,6 @@ if (xml_ctx != NULL && name != NULL && xml_ctx->pool != NULL && switch_ivr_menu_stack_xml_find(xml_ctx, name) == NULL) { switch_ivr_menu_xml_map_t *map = switch_core_alloc(xml_ctx->pool, sizeof(switch_ivr_menu_xml_map_t)); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "switch_ivr_menu_stack_xml_add binding '%s'\n", name); - // and we have memory if (map != NULL) { map->name = switch_core_strdup(xml_ctx->pool, name); map->action = action; @@ -507,6 +505,10 @@ } else { status = SWITCH_STATUS_MEMERR; } + + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "switch_ivr_menu_stack_xml_add binding '%s'\n", name); + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to add binding %s\n", name); } return status; @@ -533,7 +535,7 @@ static switch_bool_t is_valid_action(const char *action) { int i; - + if (!switch_strlen_zero(action)) { for(i = 0;;i++) { if (!iam[i].name) { @@ -575,10 +577,9 @@ } // build the standard/default xml menu handler mappings if (status == SWITCH_STATUS_SUCCESS && xml_menu_ctx != NULL && *xml_menu_ctx != NULL) { - int iam_qty = (sizeof(iam) / sizeof(iam[0])); int i; - for (i = 0; i < iam_qty && status == SWITCH_STATUS_SUCCESS; i++) { + for (i = 0; iam[i].name && status == SWITCH_STATUS_SUCCESS; i++) { status = switch_ivr_menu_stack_xml_add(*xml_menu_ctx, iam[i].name, iam[i].action, NULL); } }
participants (1)
-
Freeswitch SVN