mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
fix switch_get_addr to work with v6 properly
This commit is contained in:
committed by
Brian West
parent
86fcc2c04c
commit
f1430d521a
@@ -1482,6 +1482,17 @@ SWITCH_DECLARE(int) switch_cmp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *s
|
||||
return 0;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) get_addr6(char *buf, switch_size_t len, struct sockaddr_in6 *sa, socklen_t salen)
|
||||
{
|
||||
switch_assert(buf);
|
||||
*buf = '\0';
|
||||
|
||||
if (sa) {
|
||||
inet_ntop(AF_INET6, sa, buf, len);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct sockaddr *sa, socklen_t salen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user