From: Olle Johansson Date: Sun, 6 Jul 2008 08:32:11 +0000 (+0000) Subject: Fix severe problem with my previous commit of "kill-the-user". Russell saw a problem... X-Git-Tag: 1.6.2.0-beta1~1762 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25ce6ce19e756eb54787f711858d0c41db3771be;p=thirdparty%2Fasterisk.git Fix severe problem with my previous commit of "kill-the-user". Russell saw a problem with this code, but not the correct problem. Thanks, anyway! ;-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128379 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d6b7cdfacc..9d3d5de10b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11672,8 +11672,8 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, /* First find device on name */ peer = find_peer(of, NULL, TRUE, FALSE); - /* Then find device on IP (if it's not a SUBSCRIBE) */ - if (sipmethod != SIP_SUBSCRIBE) + /* If not found, then find device on IP (if it's not a SUBSCRIBE) */ + if (!peer && sipmethod != SIP_SUBSCRIBE) find_peer(NULL, &p->recv, TRUE, FALSE); if (!peer) {