aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-10 21:22:19 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-10 21:22:19 +0000
commit9aa513ea041ac31995e3e5fcefd849bd98f23ec7 (patch)
treebaa94ca703a771b2569ee2c0c6378b3a0ebbcbaf /channels
parent1d08c61d23d6592721b53a0bf74caa243a09e51c (diff)
Merged revisions 148376 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r148376 | mmichelson | 2008-10-10 16:21:45 -0500 (Fri, 10 Oct 2008) | 13 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.1@148377 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 257f0f8b5..335d3e8e2 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11759,13 +11759,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)