diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-10-10 21:21:45 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-10-10 21:21:45 +0000 |
commit | 399d82541a570388b29b9e18c4af5178322ece4a (patch) | |
tree | eb1978f792cea77c99d85a31bd5d38ba6928b4b7 /channels/chan_sip.c | |
parent | 1d4bb1ce59e9ab013cf9f69912fb9121c4d9e239 (diff) |
The logic used when checking a peer got changed subtly
in the "kill the user" commit and caused calls relying
on the insecure setting to not work properly. I changed
for finding a peer back to how it was prior to that
commit.
(closes issue #13644)
Reported by: pj
Patches:
13644_trunkv2.patch uploaded by putnopvut (license 60)
Tested by: pj
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e1926eeae..2b23f6f0a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11997,13 +11997,7 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, /* For subscribes, match on device name only; for other methods, * match on IP address-port of the incoming request. */ - /* First find device on name */ - peer = find_peer(of, NULL, TRUE, FALSE, FALSE); - - /* If not found, then find device on IP (if it's not a SUBSCRIBE) */ - if (!peer && sipmethod != SIP_SUBSCRIBE) { - peer = find_peer(NULL, &p->recv, TRUE, FALSE, FALSE); - } + peer = (sipmethod == SIP_SUBSCRIBE) ? find_peer(of, NULL, TRUE, FALSE, FALSE) : find_peer(NULL, &p->recv, TRUE, FALSE, FALSE); if (!peer) { if (debug) |