From 6ee39ddfde07c9c5f1bc8b34f0429bfd5be8ddb8 Mon Sep 17 00:00:00 2001 From: jpeeler Date: Mon, 7 Apr 2008 15:16:44 +0000 Subject: (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: http://svn.digium.com/svn/asterisk/branches/1.4@113012 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'channels/chan_sip.c') diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 45a8b8d96..fe89d9730 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(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)))) { -- cgit v1.2.3