move nested condition parsing to only happen if main condition was satisfied may alter behaviour see docs and FS-4935

This commit is contained in:
Anthony Minessale 2015-04-09 15:08:52 -05:00 committed by Michael Jerris
parent d1a21c8dd2
commit fc0bf67219
1 changed files with 11 additions and 10 deletions

View File

@ -197,16 +197,6 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
do_break_a = NULL;
}
}
if (switch_xml_child(xcond, "condition")) {
if (!(proceed = parse_exten(session, caller_profile, xcond, extension, orig_exten_name, recur + 1))) {
if (do_break_i == BREAK_NEVER) {
continue;
}
goto done;
}
}
if (time_match == 1) {
if ( switch_core_test_flag(SCF_DIALPLAN_TIMESTAMPS) ) {
@ -584,6 +574,17 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
(anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) {
break;
}
if (proceed) {
if (switch_xml_child(xcond, "condition")) {
if (!(proceed = parse_exten(session, caller_profile, xcond, extension, orig_exten_name, recur + 1))) {
if (do_break_i == BREAK_NEVER) {
continue;
}
goto done;
}
}
}
}
done: