summaryrefslogtreecommitdiffstats
path: root/src/tests/fail_over-tests.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-06-10 14:05:45 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-06-15 15:56:13 -0400
commit1240496176a07e804c57d43926509d5ccbf0fc41 (patch)
treef74391b6ad92996ba24fe23e09122a7452aa2e16 /src/tests/fail_over-tests.c
parent3d334807f302603b81996b41f2a365ce75f36d17 (diff)
downloadsssd_unused-1240496176a07e804c57d43926509d5ccbf0fc41.tar.gz
sssd_unused-1240496176a07e804c57d43926509d5ccbf0fc41.tar.xz
sssd_unused-1240496176a07e804c57d43926509d5ccbf0fc41.zip
Switch resolver to using resolv_hostent and honor TTL
Diffstat (limited to 'src/tests/fail_over-tests.c')
-rw-r--r--src/tests/fail_over-tests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c
index a96549dc..84016dd9 100644
--- a/src/tests/fail_over-tests.c
+++ b/src/tests/fail_over-tests.c
@@ -147,7 +147,7 @@ test_resolve_service_callback(struct tevent_req *req)
int port;
struct task *task;
struct fo_server *server = NULL;
- struct hostent *he;
+ struct resolv_hostent *he;
int i;
task = tevent_req_callback_data(req, struct task);
@@ -172,10 +172,10 @@ test_resolve_service_callback(struct tevent_req *req)
he = fo_get_server_hostent(server);
fail_if(he == NULL, "%s: fo_get_server_hostent() returned NULL");
- for (i = 0; he->h_addr_list[i]; i++) {
+ for (i = 0; he->addr_list[i]; i++) {
char buf[256];
- inet_ntop(he->h_addrtype, he->h_addr_list[i], buf, sizeof(buf));
+ inet_ntop(he->family, he->addr_list[i]->ipaddr, buf, sizeof(buf));
fail_if(strcmp(buf, "127.0.0.1") != 0 && strcmp(buf, "::1") != 0);
}