FS-7602 FS-7499 FS-7587 #comment another refactoring pass on candidate parsing and ipv4/6 parsing

This commit is contained in:
Anthony Minessale committed 2015-06-03 15:54:21 -05:00
1 parent fc075a75e5
commit 6c135e15c1
6 files changed
+171 -198

No files matched your search

+6 -2
View File
@@ -864,11 +864,15 @@ SWITCH_DECLARE(const char *) switch_get_addr(char *buf, switch_size_t len, switc
return SWITCH_BLANK_STRING;
}
memset(buf, 0, len);
if (in->family == AF_INET) {
return get_addr(buf, len, (struct sockaddr *) &in->sa, in->salen);
get_addr(buf, len, (struct sockaddr *) &in->sa, in->salen);
return buf;
}
return get_addr6(buf, len, (struct sockaddr_in6 *) &in->sa, in->salen);
get_addr6(buf, len, (struct sockaddr_in6 *) &in->sa, in->salen);
return buf;
}
SWITCH_DECLARE(uint16_t) switch_sockaddr_get_port(switch_sockaddr_t *sa)