summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2008-03-25 20:02:57 +0000
committerJeff Peeler <jpeeler@digium.com>2008-03-25 20:02:57 +0000
commit13787bc59586c0b1c9bcf334a8befa64f074ebdb (patch)
treec795e713a438ffa4738ef697f9463a587cd0ec6d /channels
parentc6453ded22d2e00c9f637f750c884fcbe2cdc91a (diff)
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@110726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 ffca4208b..cfa383564 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3606,7 +3606,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)))) {