提交 928f6cda authored 作者: Anthony Minessale's avatar Anthony Minessale

fix possible memory overload during error condition

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8462 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0ba45ead
...@@ -569,7 +569,11 @@ SWITCH_STANDARD_APP(fifo_function) ...@@ -569,7 +569,11 @@ SWITCH_STANDARD_APP(fifo_function)
switch_core_session_flush_private_events(session); switch_core_session_flush_private_events(session);
if (moh) { if (moh) {
switch_ivr_play_file(session, NULL, moh, &args); switch_status_t status = switch_ivr_play_file(session, NULL, moh, &args);
if (!SWITCH_READ_ACCEPTABLE(status)) {
aborted = 1;
goto abort;
}
} else { } else {
switch_ivr_collect_digits_callback(session, &args, 0); switch_ivr_collect_digits_callback(session, &args, 0);
} }
...@@ -736,10 +740,15 @@ SWITCH_STANDARD_APP(fifo_function) ...@@ -736,10 +740,15 @@ SWITCH_STANDARD_APP(fifo_function)
pop = NULL; pop = NULL;
if (moh && do_wait) { if (moh && do_wait) {
switch_status_t status = switch_ivr_play_file(session, NULL, moh, &args);
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.read_frame_callback = consumer_read_frame_callback; args.read_frame_callback = consumer_read_frame_callback;
args.user_data = node_list; args.user_data = node_list;
switch_ivr_play_file(session, NULL, moh, &args); switch_ivr_play_file(session, NULL, moh, &args);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
} }
for(i = 0; i < node_count; i++) { for(i = 0; i < node_count; i++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论