on the advice of the insightful creator of dns.c, account for when a UDP

answer is truncated and the resolver switches to TCP, causing the pollfd
descriptor will change. Any poll on this old descriptor will either
timeout or continually poll as ready

SVN revision: 71776
This commit is contained in:
Mike Blumenkrantz 2012-06-07 07:22:53 +00:00
parent 657aee840e
commit a00765361d
1 changed files with 9 additions and 3 deletions

View File

@ -115,10 +115,16 @@ error:
static Eina_Bool
_dns_fd_cb(Ecore_Con_DNS *dns, Ecore_Fd_Handler *fdh)
_dns_fd_cb(Ecore_Con_DNS *dns, Ecore_Fd_Handler *fdh __UNUSED__)
if (_ecore_con_dns_check(dns) == 1)
ecore_main_fd_handler_active_set(fdh, dns_ai_events(dns->ai));
if (_ecore_con_dns_check(dns) != 1) return ECORE_CALLBACK_RENEW;
if (ecore_main_fd_handler_fd_get(dns->fdh) != dns_ai_pollfd(dns->ai))
dns->fdh = ecore_main_fd_handler_add(dns_ai_pollfd(dns->ai), dns_ai_events(dns->ai), (Ecore_Fd_Cb)_dns_fd_cb, dns, NULL, NULL);
ecore_main_fd_handler_active_set(dns->fdh, dns_ai_events(dns->ai));