提交 a5e0ddf8 authored 作者: Anthony Minessale's avatar Anthony Minessale

update fix to FSCORE-85

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7183 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 499c832d
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<entry action="menu-exit" digits="*"/> <entry action="menu-exit" digits="*"/>
<entry action="menu-play-sound" digits="1" params="soundfiles/features.wav"/> <entry action="menu-play-sound" digits="1" params="soundfiles/features.wav"/>
<entry action="menu-sub" digits="2" param="demo2"/> <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-call-transfer" digits="4" param="888"/>
<entry action="menu-sub" digits="8" param="menu8"/> <entry action="menu-sub" digits="8" param="menu8"/>
</menu> </menu>
......
...@@ -489,8 +489,6 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * ...@@ -489,8 +489,6 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *
if (xml_ctx != NULL && name != NULL && xml_ctx->pool != NULL && switch_ivr_menu_stack_xml_find(xml_ctx, name) == NULL) { 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_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) { if (map != NULL) {
map->name = switch_core_strdup(xml_ctx->pool, name); map->name = switch_core_strdup(xml_ctx->pool, name);
map->action = action; map->action = action;
...@@ -507,6 +505,10 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * ...@@ -507,6 +505,10 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *
} else { } else {
status = SWITCH_STATUS_MEMERR; 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; return status;
...@@ -533,7 +535,7 @@ static struct iam_s { ...@@ -533,7 +535,7 @@ static struct iam_s {
static switch_bool_t is_valid_action(const char *action) static switch_bool_t is_valid_action(const char *action)
{ {
int i; int i;
if (!switch_strlen_zero(action)) { if (!switch_strlen_zero(action)) {
for(i = 0;;i++) { for(i = 0;;i++) {
if (!iam[i].name) { if (!iam[i].name) {
...@@ -575,10 +577,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_x ...@@ -575,10 +577,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_x
} }
// build the standard/default xml menu handler mappings // build the standard/default xml menu handler mappings
if (status == SWITCH_STATUS_SUCCESS && xml_menu_ctx != NULL && *xml_menu_ctx != NULL) { if (status == SWITCH_STATUS_SUCCESS && xml_menu_ctx != NULL && *xml_menu_ctx != NULL) {
int iam_qty = (sizeof(iam) / sizeof(iam[0]));
int i; 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); status = switch_ivr_menu_stack_xml_add(*xml_menu_ctx, iam[i].name, iam[i].action, NULL);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论