[Asterisk-cvs] asterisk/channels chan_sip.c,1.629,1.630
markster at lists.digium.com
markster at lists.digium.com
Wed Jan 12 16:57:44 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15346/channels
Modified Files:
chan_sip.c
Log Message:
Send 405 Method Not Allowed when message received outside of call (bug #3324, commited from within the plane to huntsville)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.629
retrieving revision 1.630
diff -u -d -r1.629 -r1.630
--- chan_sip.c 12 Jan 2005 15:23:06 -0000 1.629
+++ chan_sip.c 12 Jan 2005 23:01:44 -0000 1.630
@@ -7912,14 +7912,17 @@
ast_set_flag(p, SIP_NEEDDESTROY);
transmit_response(p, "200 OK", req);
} else if (!strcasecmp(cmd, "MESSAGE")) {
- if (!ignore) {
- if (debug)
- ast_verbose("Receiving message!\n");
- receive_message(p, req);
- }
- transmit_response(p, "200 OK", req);
- if (!p->lastinvite)
+ if (p->lastinvite) {
+ if (!ignore) {
+ if (debug)
+ ast_verbose("Receiving message!\n");
+ receive_message(p, req);
+ }
+ transmit_response(p, "200 OK", req);
+ } else {
+ transmit_response(p, "405 Method Not Allowed", req);
ast_set_flag(p, SIP_NEEDDESTROY);
+ }
} else if (!strcasecmp(cmd, "SUBSCRIBE")) {
if (!ignore) {
/* Use this as the basis */
More information about the svn-commits
mailing list