]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 57475 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Fri, 2 Mar 2007 17:06:52 +0000 (17:06 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 2 Mar 2007 17:06:52 +0000 (17:06 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r57475 | file | 2007-03-02 12:02:46 -0500 (Fri, 02 Mar 2007) | 2 lines

If a SIP message comes in and goes to a method handler that requires additional values that may not be present then send back an error.

........

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

channels/chan_sip.c

index c99c330da661d79801a73571406d97615922de4f..63e0280c9cfaf79252c09d1e89a5947fb04af21a 100644 (file)
@@ -14642,6 +14642,12 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
                }
        }
 
+       if (!e && (p->method == SIP_INVITE || p->method == SIP_SUBSCRIBE || p->method == SIP_REGISTER || p->method == SIP_NOTIFY)) {
+               transmit_response(p, "503 Server error", req);
+               sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+               return -1;
+       }
+
        /* Handle various incoming SIP methods in requests */
        switch (p->method) {
        case SIP_OPTIONS: