From: Jeff Peeler Date: Tue, 25 Mar 2008 20:03:13 +0000 (+0000) Subject: This one line change makes an if inside a for loop (in realtime_peer) check all the... X-Git-Tag: 1.4.19-rc4~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e510971e20200dfceb39aa5e78cc99490505e2de;p=thirdparty%2Fasterisk.git This one line change makes an if inside a for loop (in realtime_peer) check all the ast_variables the loop was intending to test rather than just the first one. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@110727 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 46a6cbb2fe..8f0b9a5eb3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2541,7 +2541,7 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct sockaddr_i */ if (var) { for (tmp = var; tmp; tmp = tmp->next) { - if (!strcasecmp(var->name, "host")) { + if (!strcasecmp(tmp->name, "host")) { struct hostent *hp; struct ast_hostent ahp; if (!(hp = ast_gethostbyname(tmp->value, &ahp)) || (memcmp(&hp->h_addr, &sin->sin_addr, sizeof(hp->h_addr)))) {