aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-02 17:09:18 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-02 17:09:18 +0000
commit354590c7987ad55018ced7f31478c745d84e35c0 (patch)
treefa08353409954995437ec26539c3ea66ec60781e /channels
parentc98e636edb4d222d9d645f701e930c269987f8e5 (diff)
Merged revisions 57477 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r57477 | file | 2007-03-02 12:06:52 -0500 (Fri, 02 Mar 2007) | 10 lines Merged revisions 57475 via svnmerge from 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: http://svn.digium.com/svn/asterisk/trunk@57478 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d477a172b..ca52b465d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15324,6 +15324,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: