Merged revisions 95191 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 28 Dec 2007 18:26:26 +0000 (18:26 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 28 Dec 2007 18:26:26 +0000 (18:26 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r95191 | russell | 2007-12-28 12:24:59 -0600 (Fri, 28 Dec 2007) | 6 lines

Remove duplicate increment of the header count in the add_header() function.

(closes issue #11648)
Reported by: makoto
Patch provided by sergee, committed patch by me, inspired by comments from putnopvut

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95192 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 91fa145..2c6aa54 100644 (file)
@@ -6301,10 +6301,6 @@ static int add_header(struct sip_request *req, const char *var, const char *valu
        snprintf(req->header[req->headers], maxlen, "%s: %s\r\n", var, value);
        req->len += strlen(req->header[req->headers]);
        req->headers++;
-       if (req->headers < SIP_MAX_HEADERS)
-               req->headers++;
-       else
-               ast_log(LOG_WARNING, "Out of SIP header space... Will generate broken SIP message\n");
 
        return 0;       
 }