From 3241a0b89ea769c9d01b316136880cf2a8d3407f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 14 Dec 2010 11:07:24 -0500 Subject: Reschedule the fd timeout for secondary lookups We were unscheduling the timeout handler after the first lookup (A or AAAA) returned, but not rescheduling it if we went on to check the secondary record type. This resulted in the resolver never returning a result for the secondary lookup, which can mean that logins/screen unlocks after VPN drop or suspend/resume might never complete. Fixes https://fedorahosted.org/sssd/ticket/729 --- src/resolv/async_resolv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c index 8aa0e0d1..b7e03ded 100644 --- a/src/resolv/async_resolv.c +++ b/src/resolv/async_resolv.c @@ -571,6 +571,8 @@ resolv_gethostbyname_done(void *arg, int status, int timeouts, struct hostent *h DEBUG(4, ("Trying to resolve %s record of '%s'\n", state->family == AF_INET ? "A" : "AAAA", state->name)); + schedule_timeout_watcher(state->resolv_ctx->ev_ctx, + state->resolv_ctx); ares_gethostbyname(state->resolv_ctx->channel, state->name, state->family, resolv_gethostbyname_next_done, req); @@ -600,6 +602,8 @@ resolv_gethostbyname_next_done(void *arg, int status, int timeouts, struct hoste return; } + unschedule_timeout_watcher(state->resolv_ctx); + if (hostent != NULL) { state->hostent = resolv_copy_hostent(req, hostent); if (state->hostent == NULL) { -- cgit