Handle quoted <'s (bug #2223)
authorMark Spencer <markster@digium.com>
Mon, 23 Aug 2004 14:16:25 +0000 (14:16 +0000)
committerMark Spencer <markster@digium.com>
Mon, 23 Aug 2004 14:16:25 +0000 (14:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3634 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0c7c340..937a942 100755 (executable)
@@ -949,7 +949,17 @@ static char *ditch_braces(char *tmp)
 {
        char *c = tmp;
        char *n;
-       if ((n = strchr(tmp, '<')) ) {
+       char *q;
+       if ((q = strchr(tmp, '"')) ) {
+               c = q + 1;
+               if ((q = strchr(c, '"')) )
+                       c = q + 1;
+               else {
+                       ast_log(LOG_WARNING, "No closing quote in '%s'\n", tmp);
+                       c = tmp;
+               }
+       }
+       if ((n = strchr(c, '<')) ) {
                c = n + 1;
                while(*c && *c != '>') c++;
                if (*c != '>') {