From: Anthony Minessale Date: Sat, 16 Aug 2008 15:57:07 +0000 (+0000) Subject: fail call on extensions with nested conditions X-Git-Tag: v1.0.2~1423 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74399da17666df75796b74d09d56b3914f385362;p=thirdparty%2Ffreeswitch.git fail call on extensions with nested conditions git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9312 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c index b63165b090..a979b85090 100644 --- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c @@ -64,6 +64,12 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t * switch_safe_free(field_expanded); switch_safe_free(expression_expanded); + if (switch_xml_child(xcond, "condition")) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Nested conditions are not allowed!\n"); + proceed = 1; + goto done; + } + field = (char *) switch_xml_attr(xcond, "field"); if ((xexpression = switch_xml_child(xcond, "expression"))) {