* svn propset svn_keywords 'Id' on some files that didn't have it
[citadel.git] / citadel / modules / checkpoint / serv_checkpoint.c
index 32bfad00bb438526597a59b7acfb9bab7bedaf69..495242add65221031750616580cf7b31e111da3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: serv_checkpoint.c 5756 2007-11-16 17:15:22Z ajc $
+ * $Id$
  *
  * checkpointing module for the database
  */
@@ -28,6 +28,8 @@
 #error Citadel requires Berkeley DB v4.1 or newer.  Please upgrade.
 #endif
 
+#include <libcitadel.h>
+
 #include "citadel.h"
 #include "server.h"
 #include "citserver.h"
@@ -35,6 +37,7 @@
 #include "msgbase.h"
 #include "sysdep_decls.h"
 #include "config.h"
+#include "threads.h"
 
 #include "ctdl_module.h"
  
 void *checkpoint_thread(void *arg) {
        struct CitContext checkpointCC;
 
-       CtdlThreadAllocTSD();
-       
        CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
 
-       memset(&checkpointCC, 0, sizeof(struct CitContext));
-       checkpointCC.internal_pgm = 1;
-       checkpointCC.cs_pid = 0;
-       pthread_setspecific(MyConKey, (void *)&checkpointCC );
+       CtdlFillSystemContext(&checkpointCC, "checkpoint");
+       citthread_setspecific(MyConKey, (void *)&checkpointCC );
 
        while (!CtdlThreadCheckStop()) {
                cdb_checkpoint();
@@ -69,5 +68,5 @@ CTDL_MODULE_INIT(checkpoint) {
                CtdlThreadCreate ("checkpoint", CTDLTHREAD_BIGSTACK, checkpoint_thread, NULL);
        }
        /* return our Subversion id for the Log */
-       return "$Id: serv_autocompletion.c 5756 2007-11-16 17:15:22Z ajc $";
+       return "$Id$";
 }