From 6b101367b80c75f459553b1728f97c27325ffe09 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 24 May 2006 21:24:45 +0000 Subject: [PATCH] oops... make sure to stop processing a request once we have sent an authentication challenge (issue #7220) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30098 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ed1b8f5b94..4b72af406f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10457,6 +10457,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int 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 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, } /* 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")); -- 2.47.2