]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/checkpoint/serv_checkpoint.c
Changed the way we do the TSD area.
[citadel.git] / citadel / modules / checkpoint / serv_checkpoint.c
index 819f1989b7bc20822feadb8b6478837926c6cf92..32bfad00bb438526597a59b7acfb9bab7bedaf69 100644 (file)
@@ -44,6 +44,8 @@
 void *checkpoint_thread(void *arg) {
        struct CitContext checkpointCC;
 
+       CtdlThreadAllocTSD();
+       
        CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
 
        memset(&checkpointCC, 0, sizeof(struct CitContext));
@@ -51,8 +53,6 @@ void *checkpoint_thread(void *arg) {
        checkpointCC.cs_pid = 0;
        pthread_setspecific(MyConKey, (void *)&checkpointCC );
 
-       cdb_allocate_tsd();
-
        while (!CtdlThreadCheckStop()) {
                cdb_checkpoint();
                CtdlThreadSleep(60);