From: Anthony Minessale Date: Fri, 24 Oct 2008 19:25:07 +0000 (+0000) Subject: fix parser err X-Git-Tag: v1.0.2~699 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f95887b13ad020c5ebbf3a96e6730d9574e3dad0;p=thirdparty%2Ffreeswitch.git fix parser err git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10142 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 2ab8ea3b3c..b0ddfee7ad 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -917,12 +917,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess end = switch_find_end_paren(p, '[', ']'); } - if (end && p && *p == ',') { + if (end && p < end && *p == ',') { *p = '|'; } if (p == end) { - e = NULL; + end = NULL; } p++; @@ -954,6 +954,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess } else { vdata = NULL; } + printf("WTF [%s][%s]\n", vdata, chan_type); if ((chan_data = strchr(chan_type, '/')) != 0) { *chan_data = '\0';