mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 18:30:01 +00:00
use portable switch_inet_ntop
This commit is contained in:
parent
81863e44b6
commit
73acee7146
@ -530,7 +530,7 @@ SWITCH_STANDARD_API(gethost_api_function)
|
||||
|
||||
if (he) {
|
||||
memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
|
||||
ip = inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
|
||||
ip = switch_inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
|
||||
stream->write_function(stream, "%s", ip);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -5094,7 +5094,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
|
||||
|
||||
if (he) {
|
||||
memcpy(&sa.sin_addr, he->h_addr, sizeof(struct in_addr));
|
||||
ip = inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
|
||||
ip = switch_inet_ntop(AF_INET, &sa.sin_addr, buf, sizeof(buf));
|
||||
tmp = switch_string_replace(dest, host, ip);
|
||||
|
||||
switch_channel_set_variable_printf(nchannel, "sip_route_uri", "sip:%s", tmp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user