fix possible memory overload during error condition
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8462 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0ba45ead64
commit
928f6cda1e
|
@ -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)
|
||||||
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++) {
|
||||||
|
|
Loading…
Reference in New Issue