From f95887b13ad020c5ebbf3a96e6730d9574e3dad0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 24 Oct 2008 19:25:07 +0000 Subject: [PATCH] fix parser err git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10142 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_originate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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';