X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fpop3client%2Fserv_pop3client.c;h=3bc0984833e8491e80dc74118105f701ed0e2a43;hb=e4a11960ed242bc53c90f6fde598bf301ece6f8a;hp=8a0693304611d418ec46e5ebc71ced13cc3f317d;hpb=d75ab6a3ad9760b378adb119aee679f3aa18cd06;p=citadel.git diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index 8a0693304..3bc098483 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -308,7 +308,12 @@ void pop3client_scan(void) { static int doing_pop3client = 0; struct pop3aggr *pptr; time_t fastest_scan; - + CitContext popclientCC; + + /* Give this thread its own private CitContext */ + CtdlFillSystemContext(&popclientCC, "popclient"); + citthread_setspecific(MyConKey, (void *)&popclientCC ); + if (config.c_pop3_fastest < config.c_pop3_fetch) fastest_scan = config.c_pop3_fastest; else @@ -346,6 +351,7 @@ void pop3client_scan(void) { CtdlLogPrintf(CTDL_DEBUG, "pop3client ended\n"); last_run = time(NULL); doing_pop3client = 0; + CtdlClearSystemContext(); }