]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #12362)
authorJeff Peeler <jpeeler@digium.com>
Mon, 7 Apr 2008 15:16:44 +0000 (15:16 +0000)
committerJeff Peeler <jpeeler@digium.com>
Mon, 7 Apr 2008 15:16:44 +0000 (15:16 +0000)
(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/branches/1.4@113012 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 45a8b8d964f9005371355b67db978edc583c4c59..fe89d973005834ead4711eb41b9bbe34ee204019 100644 (file)
@@ -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)))) {