]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 78139 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 5 Aug 2007 03:42:35 +0000 (03:42 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 5 Aug 2007 03:42:35 +0000 (03:42 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78139 | tilghman | 2007-08-04 22:29:01 -0500 (Sat, 04 Aug 2007) | 2 lines

If peer is not found, the error message is misleading (should be peer not found, not ACL failure)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f2f031e3ae25efc8d7e2e45489c620b7b6938abf..a960e9deb196f4299fca4a29d01edb826d6f3d25 100644 (file)
@@ -9130,10 +9130,12 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct sockaddr
        peer = find_peer(name, NULL, 1);
        if (!(peer && ast_apply_ha(peer->ha, sin))) {
                /* Peer fails ACL check */
-               if (peer)
+               if (peer) {
                        unref_peer(peer);
-               peer = NULL;
-               res = AUTH_ACL_FAILED;
+                       peer = NULL;
+                       res = AUTH_ACL_FAILED;
+               } else
+                       res = AUTH_NOT_FOUND;
        }
        if (peer) {
                /* Set Frame packetization */