From: Tilghman Lesher Date: Sun, 5 Aug 2007 03:29:01 +0000 (+0000) Subject: If peer is not found, the error message is misleading (should be peer not found,... X-Git-Tag: 1.4.10~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7ade6f21312c40e22a443ef8535a88eb6feb095;p=thirdparty%2Fasterisk.git 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/branches/1.4@78139 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6529b03651..3e695b0b63 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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 */