diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 21:24:45 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 21:24:45 +0000 |
commit | 01f38da4ebc4a92fb1d046e72246f7a5257a6ce3 (patch) | |
tree | 8eab2673ecc6d737f31e3305c578504d58385544 | |
parent | f7d22e8dcf6a9daf1b0fbd9e35ec94476a7a6f77 (diff) |
oops... make sure to stop processing a request once we have sent an authentication challenge (issue #7220)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@30098 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ed1b8f5b9..4b72af406 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")); |