From: Anthony Minessale Date: Tue, 11 Feb 2014 22:31:21 +0000 (+0500) Subject: use portable switch_inet_ntop X-Git-Tag: v1.5.8~25^2~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10d2dd3e73aa0d3599aff7da0949f39a9d6313d5;p=thirdparty%2Ffreeswitch.git use portable switch_inet_ntop --- diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 1e10a8f8f4..90dd06d314 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -529,7 +529,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; } diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 3454de053e..f16a1477a7 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -4292,7 +4292,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); //host = switch_core_session_strdup(nsession, ip); //dest = switch_core_session_strdup(nsession, tmp);