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

View File

@ -198,16 +198,6 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
} }
} }
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 (time_match == 1) {
if ( switch_core_test_flag(SCF_DIALPLAN_TIMESTAMPS) ) { if ( switch_core_test_flag(SCF_DIALPLAN_TIMESTAMPS) ) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
@ -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) { (anti_action == SWITCH_TRUE && do_break_i == BREAK_ON_FALSE)) || do_break_i == BREAK_ALWAYS) {
break; 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: done: