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
1.6.2
Mark Michelson 18 years ago
parent 1d4bb1ce59
commit 399d82541a

@ -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)

Loading…
Cancel
Save