]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/pop3client/serv_pop3client.c
c-ares: make InitC_ares_dns() private to serv_cares.c
[citadel.git] / citadel / modules / pop3client / serv_pop3client.c
index 51f1d62db580ef95212d48f6ef46f24a2c376625..826a191abb4baae3bfb6ebf436e147d3690ce32b 100644 (file)
@@ -706,6 +706,14 @@ eNextState POP3_C_Terminate(AsyncIO *IO)
        FinalizePOP3AggrRun(IO);
        return eAbort;
 }
+eNextState POP3_C_TerminateDB(AsyncIO *IO)
+{
+///    pop3aggr *pMsg = (pop3aggr *)IO->Data;
+
+       syslog(LOG_DEBUG, "POP3: %s\n", __FUNCTION__);
+       FinalizePOP3AggrRun(IO);
+       return eAbort;
+}
 eNextState POP3_C_Timeout(AsyncIO *IO)
 {
        pop3aggr *pMsg = IO->Data;
@@ -844,14 +852,6 @@ eNextState pop3_get_one_host_ip_done(AsyncIO *IO)
 eNextState pop3_get_one_host_ip(AsyncIO *IO)
 {
        pop3aggr *cpptr = IO->Data;
-       /*
-        * here we start with the lookup of one host. it might be...
-        * - the relay host *sigh*
-        * - the direct hostname if there was no mx record
-        * - one of the mx'es
-        */
-
-       InitC_ares_dns(IO);
 
        syslog(LOG_DEBUG, "POP3: %s\n", __FUNCTION__);
 
@@ -883,6 +883,7 @@ int pop3_do_fetching(pop3aggr *cpptr)
                     POP3_C_DispatchWriteDone,
                     POP3_C_DispatchReadDone,
                     POP3_C_Terminate,
+                    POP3_C_TerminateDB,
                     POP3_C_ConnFail,
                     POP3_C_Timeout,
                     POP3_C_Shutdown);
@@ -1177,7 +1178,7 @@ CTDL_MODULE_INIT(pop3client)
                POP3QueueRooms = NewHash(1, lFlathash);
                POP3FetchUrls = NewHash(1, NULL);
                CtdlRegisterSessionHook(pop3client_scan, EVT_TIMER);
-               CtdlRegisterCleanupHook(pop3_cleanup);
+               CtdlRegisterEVCleanupHook(pop3_cleanup);
        }
 
        /* return our module id for the log */