[asterisk-commits] oej: branch 1.2 r46604 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Oct 31 02:13:34 MST 2006


Author: oej
Date: Tue Oct 31 03:13:34 2006
New Revision: 46604

URL: http://svn.digium.com/view/asterisk?rev=46604&view=rev
Log:
If peer fails ACL check, fail the REGISTER attempt

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=46604&r1=46603&r2=46604&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Tue Oct 31 03:13:34 2006
@@ -6566,8 +6566,10 @@
 	build_contact(p);
 	peer = find_peer(name, NULL, 1);
 	if (!(peer && ast_apply_ha(peer->ha, sin))) {
+		/* Peer fails ACL check */
 		if (peer)
 			ASTOBJ_UNREF(peer,sip_destroy_peer);
+		peer = NULL;
 	}
 	if (peer) {
 		if (!ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)) {



More information about the asterisk-commits mailing list