fix ipv6 issue

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15310 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-11-01 19:53:31 +00:00
parent 8954dc5755
commit 9fb56c87f2
1 changed files with 2 additions and 1 deletions

View File

@ -1374,7 +1374,8 @@ SWITCH_DECLARE(int) switch_cmp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *s
case AF_INET:
return (s1->sin_addr.s_addr == s2->sin_addr.s_addr && s1->sin_port == s2->sin_port);
case AF_INET6:
return (s16->sin6_addr.s6_addr == s26->sin6_addr.s6_addr && s16->sin6_port == s26->sin6_port);
return (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr &&
*s16->sin6_addr.s6_addr == *s26->sin6_addr.s6_addr && s16->sin6_port == s26->sin6_port);
}
return 0;