[asterisk-commits] branch 1.2 r30098 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 24 14:24:46 MST 2006


Author: kpfleming
Date: Wed May 24 16:24:45 2006
New Revision: 30098

URL: http://svn.digium.com/view/asterisk?rev=30098&view=rev
Log:
oops... make sure to stop processing a request once we have sent an authentication challenge (issue #7220)

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=30098&r1=30097&r2=30098&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Wed May 24 16:24:45 2006
@@ -10457,6 +10457,9 @@
 	if (!p->lastinvite && !ignore && !p->owner) {
 		/* Handle authentication if this is our first invite */
 		res = check_user(p, req, SIP_INVITE, e, 1, sin, ignore);
+		/* if an authentication challenge was sent, we are done here */
+		if (res > 0)
+			return 0;
 		if (res < 0) {
 			if (res == -4) {
 				ast_log(LOG_NOTICE, "Sending fake auth rejection for user %s\n", get_header(req, "From"));
@@ -10864,6 +10867,9 @@
 		}
 		/* Handle authentication if this is our first subscribe */
 		res = check_user_full(p, req, SIP_SUBSCRIBE, e, 0, sin, ignore, mailbox, mailboxsize);
+		/* if an authentication challenge was sent, we are done here */
+		if (res > 0)
+			return 0;
 		if (res < 0) {
 			if (res == -4) {
 				ast_log(LOG_NOTICE, "Sending fake auth rejection for user %s\n", get_header(req, "From"));



More information about the asterisk-commits mailing list