]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make SIPADDHEADER() propagate indefinitely
authorTerry Wilson <twilson@digium.com>
Mon, 25 Aug 2008 20:46:10 +0000 (20:46 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 25 Aug 2008 20:46:10 +0000 (20:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 193d2a98aef8df6f45b73f4e7a6cd99684593285..b4e83d440307a4706fff91c6cde06605013c307b 100644 (file)
@@ -18203,10 +18203,10 @@ static int sip_addheader(struct ast_channel *chan, void *data)
        /* Check for headers */
        while (!ok && no <= 50) {
                no++;
-               snprintf(varbuf, sizeof(varbuf), "_SIPADDHEADER%.2d", no);
+               snprintf(varbuf, sizeof(varbuf), "__SIPADDHEADER%.2d", no);
 
-               /* Compare without the leading underscore */
-               if( (pbx_builtin_getvar_helper(chan, (const char *) varbuf + 1) == (const char *) NULL) )
+               /* Compare without the leading underscores */
+               if( (pbx_builtin_getvar_helper(chan, (const char *) varbuf + 2) == (const char *) NULL) )
                        ok = TRUE;
        }
        if (ok) {