From bfdcff2b28f399d236b592d13663c7283d6eac2c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 27 May 2011 11:44:16 +0200 Subject: Add utility function to return IP address as string --- src/providers/ipa/ipa_common.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/providers/ipa') diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c index da3fcd6f..eadbda35 100644 --- a/src/providers/ipa/ipa_common.c +++ b/src/providers/ipa/ipa_common.c @@ -609,15 +609,9 @@ static void ipa_resolve_callback(void *private_data, struct fo_server *server) return; } - address = talloc_zero_size(service, 128); + address = resolv_get_string_address(service, srvaddr); if (address == NULL) { - DEBUG(1, ("talloc_zero failed.\n")); - return; - } - - if (inet_ntop(srvaddr->h_addrtype, srvaddr->h_addr_list[0], - address, 128) == NULL) { - DEBUG(1, ("inet_ntop failed [%d][%s].\n", errno, strerror(errno))); + DEBUG(1, ("resolv_get_string_address failed.\n")); return; } -- cgit