]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix parser err
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 24 Oct 2008 19:25:07 +0000 (19:25 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 24 Oct 2008 19:25:07 +0000 (19:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10142 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index 2ab8ea3b3cbf30ea8a57684e6f8f8b122b47e752..b0ddfee7ad607d5ee25e1832cf251d4ddac204c7 100644 (file)
@@ -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';