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
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 */