It = GetNewHashPos(POP3FetchUrls, 0);
pthread_mutex_lock(&POP3QueueMutex);
{
- GetHashPosFromKey(POP3FetchUrls, SKEY(cptr->Url), It);
- DeleteEntryFromHash(POP3FetchUrls, It);
+ if (GetHashPosFromKey(POP3FetchUrls, SKEY(cptr->Url), It))
+ DeleteEntryFromHash(POP3FetchUrls, It);
}
pthread_mutex_unlock(&POP3QueueMutex);
DeleteHashPos(&It);
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,
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;
void pop3_cleanup(void)
{
/* citthread_mutex_destroy(&POP3QueueMutex); TODO */
-// DeleteHash(&POP3FetchUrls);
+ while (doing_pop3client != 0) ;
+ DeleteHash(&POP3FetchUrls);
DeleteHash(&POP3QueueRooms);
}