X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fpop3client%2Fserv_pop3client.c;h=8a0d23c38f6c64537d9d2f44573082169509a43a;hb=cf7cb2463d47a4a9ed36c8d1c13f188418389437;hp=9e9ac87d0baa91dded211f6f9f0011d461aa5fd8;hpb=06e958649c74041cc5cc68ba23bc3d6cf70f1de4;p=citadel.git diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index 9e9ac87d0..8a0d23c38 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -766,10 +766,10 @@ eNextState pop3_connect_ip(AsyncIO *IO) /////// SetConnectStatus(IO); - return InitEventIO(IO, cpptr, - POP3_C_ConnTimeout, - POP3_C_ReadTimeouts[0], - 1); + return EvConnectSock(IO, cpptr, + POP3_C_ConnTimeout, + POP3_C_ReadTimeouts[0], + 1); } eNextState pop3_get_one_host_ip_done(AsyncIO *IO) @@ -852,7 +852,7 @@ int pop3_do_fetching(pop3aggr *cpptr) cpptr->IO.Terminate = POP3_C_Terminate; cpptr->IO.LineReader = POP3_C_ReadServerStatus; cpptr->IO.ConnFail = POP3_C_ConnFail; - cpptr->IO.DNSFail = POP3_C_DNSFail; + cpptr->IO.DNS.Fail = POP3_C_DNSFail; cpptr->IO.Timeout = POP3_C_Timeout; cpptr->IO.ShutdownAbort = POP3_C_Shutdown; @@ -869,6 +869,9 @@ int pop3_do_fetching(pop3aggr *cpptr) SubC = CloneContext (&pop3_client_CC); SubC->session_specific_data = (char*) cpptr; cpptr->IO.CitContext = SubC; + safestrncpy(SubC->cs_host, + ChrPtr(cpptr->Url), + sizeof(SubC->cs_host)); if (cpptr->IO.ConnectMe->IsIP) { QueueEventContext(&cpptr->IO, @@ -1046,10 +1049,10 @@ void pop3client_scan_room(struct ctdlroom *qrbuf, void *data) FreeStrBuf(&CfgData); } +static int doing_pop3client = 0; void pop3client_scan(void) { static time_t last_run = 0L; - static int doing_pop3client = 0; /// struct pop3aggr *pptr; time_t fastest_scan; HashPos *it; @@ -1114,7 +1117,8 @@ void pop3client_scan(void) { void pop3_cleanup(void) { /* citthread_mutex_destroy(&POP3QueueMutex); TODO */ -// DeleteHash(&POP3FetchUrls); + while (doing_pop3client != 0) ; + DeleteHash(&POP3FetchUrls); DeleteHash(&POP3QueueRooms); }