diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 22:04:41 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 22:04:41 +0000 |
commit | f81cf164bbcb85462f9d5bad7aee581c80ae3c17 (patch) | |
tree | 9182aed3af86a68d20c75b06306cbdd82cbc9a70 /channels/chan_sip.c | |
parent | 7b164d01cc46048850532d0162b9777d1a5f7c1a (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@30127 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-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 b19a8d24f..f05d16b75 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10554,6 +10554,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")); @@ -10974,6 +10977,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")); |