]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When 'sip set debug' is enabled, and the last line of an incoming SIP message
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 23 Nov 2009 15:31:02 +0000 (15:31 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 23 Nov 2009 15:31:02 +0000 (15:31 +0000)
is not properly newline terminated, ensure that that line is included in the
debug output.

(part of issue #16268)

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

channels/chan_sip.c

index 0df521211ecc12f50372c60a4b5d021eba004e90..48afb798bf047b7b3fec2d5b906457996368bc9c 100644 (file)
@@ -5111,6 +5111,8 @@ static int parse_request(struct sip_request *req)
 
        /* Check a non-newline-terminated last line */
        if (!ast_strlen_zero(req->line[f])) {
+               if (sipdebug && option_debug > 3)
+                       ast_log(LOG_DEBUG, "Line: %s (%d)\n", req->line[f], (int) strlen(req->line[f]));
                req->lines++;
        }