From: Jeff Peeler Date: Mon, 7 Apr 2008 15:18:10 +0000 (+0000) Subject: Merged revisions 113012 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~2544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=566e073606dbdab2f9498f395964217c54b7c1fc;p=thirdparty%2Fasterisk.git Merged revisions 113012 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r113012 | jpeeler | 2008-04-07 10:16:44 -0500 (Mon, 07 Apr 2008) | 7 lines (closes issue #12362) (closes issue #12372) Reported by: vinsik Tested by: tecnoxarxa 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/trunk@113013 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ff8abb666e..3cc98d5e48 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3610,7 +3610,7 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct sockaddr_i */ if (var) { for (tmp = var; tmp; tmp = tmp->next) { - if (!strcasecmp(tmp->name, "host")) { + if (!strcasecmp(var->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)))) {