libc-ares migration
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 3 Jan 2011 23:33:30 +0000 (00:33 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 3 Jan 2011 23:33:30 +0000 (00:33 +0100)
  - call the ares read/write handlers in our registered read/write callbacks
  - set context appropriate.

citadel/modules/c-ares-dns/serv_c-ares-dns.c
citadel/modules/smtp/serv_smtpeventclient.c

index 2de80574df85bd3d6693459e10ad3cf1548278cf..07e44a11351a4e789a5bf16fe33261d41b45a44e 100644 (file)
@@ -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) 
index ffc18bc87c6d0a350f5b51de76ab7833559c7dbd..6c04fa5f2163c81389c7fdfa9f0c8c13eacce7d2 100644 (file)
@@ -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,