Changed the way we do the TSD area.
[citadel.git] / citadel / modules / checkpoint / serv_checkpoint.c
index 98c685856e056fce248f8d0bcf3c6207189a2e3f..32bfad00bb438526597a59b7acfb9bab7bedaf69 100644 (file)
@@ -44,7 +44,7 @@
 void *checkpoint_thread(void *arg) {
        struct CitContext checkpointCC;
 
-       CT_PUSH();
+       CtdlThreadAllocTSD();
        
        CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
 
@@ -53,9 +53,7 @@ void *checkpoint_thread(void *arg) {
        checkpointCC.cs_pid = 0;
        pthread_setspecific(MyConKey, (void *)&checkpointCC );
 
-       cdb_allocate_tsd();
-
-       while (!CtdlThreadCheckStop(CT)) {
+       while (!CtdlThreadCheckStop()) {
                cdb_checkpoint();
                CtdlThreadSleep(60);
        }