]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If an INFO request within a dialog is received with a content length of 0 simply...
authorJoshua Colp <jcolp@digium.com>
Fri, 2 Nov 2007 20:20:21 +0000 (20:20 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 2 Nov 2007 20:20:21 +0000 (20:20 +0000)
(closes issue #5747)
Reported by: chandi
Patches:
      infofix-81430-1.patch uploaded by IgorG (license 20)

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

channels/chan_sip.c

index 070677769e070d94b649347f408fc831428ec976..5a8fb58d394a2e04538f53a64168a3bf32a20e1c 100644 (file)
@@ -11003,7 +11003,12 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
                        transmit_response(p, "403 Unauthorized", req);
                }
                return;
+       } else if (ast_strlen_zero(c = get_header(req, "Content-Length")) || !strcasecmp(c, "0")) {
+               /* This is probably just a packet making sure the signalling is still up, just send back a 200 OK */
+               transmit_response(p, "200 OK", req);
+               return;
        }
+
        /* Other type of INFO message, not really understood by Asterisk */
        /* if (get_msg_text(buf, sizeof(buf), req)) { */