SMTP-Client: move the client-shutdown procedure into the DB-Thread; we musn't block...
[citadel.git] / citadel / modules / pop3client / serv_pop3client.c
index 0a97df2cc971b402c431c4b6daf5a54dbe9ae3c6..fa151f6694707e9fbae3c8f9ca883ba957be8c04 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;
@@ -883,6 +891,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);