summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-08-05 03:42:35 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-08-05 03:42:35 +0000
commit05d60c7860e25c8d2b951c8b2864621581378bb5 (patch)
tree3fb6fbcf1f1fdc72262ff60174cb055a93da8c79
parent1765f903c4d270d407508d26a239a501751865fb (diff)
Merged revisions 78139 via svnmerge from
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
-rw-r--r--channels/chan_sip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f2f031e3a..a960e9deb 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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 */