[svn-commits] trunk r26764 - in /trunk: ./ channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu May 11 02:01:54 MST 2006


Author: kpfleming
Date: Thu May 11 04:01:53 2006
New Revision: 26764

URL: http://svn.digium.com/view/asterisk?rev=26764&view=rev
Log:
Merged revisions 26760 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r26760 | kpfleming | 2006-05-11 03:52:46 -0500 (Thu, 11 May 2006) | 2 lines

ensure that we send a response to REGISTER requests that are successfully authenticated but contain invalid Contact URIs

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=26764&r1=26763&r2=26764&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu May 11 04:01:53 2006
@@ -6814,6 +6814,9 @@
 				switch (parse_register_contact(p, peer, req)) {
 				case PARSE_REGISTER_FAILED:
 					ast_log(LOG_WARNING, "Failed to parse contact info\n");
+					transmit_response_with_date(p, "400 Bad Request", req);
+					peer->lastmsgssent = -1;
+					res = 0;
 					break;
 				case PARSE_REGISTER_QUERY:
 					transmit_response_with_date(p, "200 OK", req);
@@ -6837,11 +6840,13 @@
 		peer = temp_peer(name);
 		if (peer) {
 			ASTOBJ_CONTAINER_LINK(&peerl, peer);
-			peer->lastmsgssent = -1;
 			sip_cancel_destroy(p);
 			switch (parse_register_contact(p, peer, req)) {
 			case PARSE_REGISTER_FAILED:
 				ast_log(LOG_WARNING, "Failed to parse contact info\n");
+				transmit_response_with_date(p, "400 Bad Request", req);
+				peer->lastmsgssent = -1;
+				res = 0;
 				break;
 			case PARSE_REGISTER_QUERY:
 				transmit_response_with_date(p, "200 OK", req);



More information about the svn-commits mailing list