]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If peer is not found, the error message is misleading (should be peer not found,...
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 5 Aug 2007 03:29:01 +0000 (03:29 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 5 Aug 2007 03:29:01 +0000 (03:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78139 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6529b03651e4e8228b2f8b1fa4e5f985a7f93c6e..3e695b0b63b7b3bc43a9a60d230047d29a516a39 100644 (file)
@@ -8431,10 +8431,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) {
                        ASTOBJ_UNREF(peer, sip_destroy_peer);
-               peer = NULL;
-               res = AUTH_ACL_FAILED;
+                       peer = NULL;
+                       res = AUTH_ACL_FAILED;
+               } else
+                       res = AUTH_NOT_FOUND;
        }
        if (peer) {
                /* Set Frame packetization */