]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Wed, 24 May 2006 22:04:41 +0000 (22:04 +0000)
committerAutomerge script <automerge@asterisk.org>
Wed, 24 May 2006 22:04:41 +0000 (22:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30127 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b19a8d24fc7d69fcfc1ba12c128fab202e8acb0a..f05d16b758e6f77953f5665e6555d0cf35f027a3 100644 (file)
@@ -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"));