From: Wilfried Goesgens Date: Mon, 3 Jan 2011 23:33:30 +0000 (+0100) Subject: libc-ares migration X-Git-Tag: v8.11~1128 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ed1626a8680415154da2f2f81d943e7bbbadc717;hp=529b95fb3844d9f047793836f50405a6d99991e4;p=citadel.git libc-ares migration - call the ares read/write handlers in our registered read/write callbacks - set context appropriate. --- diff --git a/citadel/modules/c-ares-dns/serv_c-ares-dns.c b/citadel/modules/c-ares-dns/serv_c-ares-dns.c index 2de80574d..07e44a113 100644 --- a/citadel/modules/c-ares-dns/serv_c-ares-dns.c +++ b/citadel/modules/c-ares-dns/serv_c-ares-dns.c @@ -529,10 +529,16 @@ int QueueQuery(ns_type Type, char *name, AsyncIO *IO, IO_CallBack PostDNS) static void DNS_recv_callback(struct ev_loop *loop, ev_io *watcher, int revents) { + AsyncIO *IO = watcher->data; + + ares_process_fd(IO->DNSChannel, IO->sock, 0); } static void DNS_send_callback(struct ev_loop *loop, ev_io *watcher, int revents) { + AsyncIO *IO = watcher->data; + + ares_process_fd(IO->DNSChannel, 0, IO->sock); } void SockStateCb(void *data, int sock, int read, int write) diff --git a/citadel/modules/smtp/serv_smtpeventclient.c b/citadel/modules/smtp/serv_smtpeventclient.c index ffc18bc87..6c04fa5f2 100644 --- a/citadel/modules/smtp/serv_smtpeventclient.c +++ b/citadel/modules/smtp/serv_smtpeventclient.c @@ -936,7 +936,7 @@ eNextState smtp_resolve_one_smtpsrv_start(void *data) int resolve_mx_records(void *Ctx) { - SmtpOutMsg * SendMsg; + SmtpOutMsg * SendMsg = Ctx; if (!QueueQuery(ns_t_mx, SendMsg->node, &SendMsg->IO,