]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
move nested condition parsing to only happen if main condition was satisfied may...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 9 Apr 2015 20:08:52 +0000 (15:08 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:18 +0000 (12:47 -0500)
src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c

index 71908b36f02b18c689993f7139f005059ed25098..b4af4a35791ff3399911d062e8d66df92bca6cd4 100644 (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: