aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 15:16:44 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 15:16:44 +0000
commit6ee39ddfde07c9c5f1bc8b34f0429bfd5be8ddb8 (patch)
tree2375d2963c510b72730d66cd3a6dfeee171c0389 /channels
parent6ec9a195fc0957d79a38dc0d81845695f9a6abae (diff)
(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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
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)))) {