]> code.citadel.org Git - citadel.git/blobdiff - citadel/database_sleepycat.c
* CULL command (replaces db_archive)
[citadel.git] / citadel / database_sleepycat.c
index a108e1fe76c92b8f1e8c4288b049e06a345e64e4..39912dae2011b97fd71daf8a60f8a48b492d3fd6 100644 (file)
@@ -255,6 +255,15 @@ static void cdb_cull_logs(void)
        }
 }
 
+/*
+ * Manually initiate log file cull.
+ */
+void cmd_cull(char *argbuf) {
+       if (CtdlAccessCheck(ac_internal)) return;
+       cdb_cull_logs();
+       cprintf("%d Database log file cull completed.\n", CIT_OK);
+}
+
 
 /*
  * Request a checkpoint of the database.
@@ -449,6 +458,8 @@ void open_databases(void)
        }
 
        lprintf(CTDL_DEBUG, "cdb_*: open_databases() finished\n");
+
+       CtdlRegisterProtoHook(cmd_cull, "CULL", "Cull database logs");
 }