/*
* Cull the database logs
*/
-static void cdb_cull_logs(void)
+void cdb_cull_logs(void)
{
u_int32_t flags;
int ret;
}
}
-/*
- * 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. Called once per minute by the thread manager.
}
syslog(LOG_DEBUG, "open_databases() finished\n");
- CtdlRegisterProtoHook(cmd_cull, "CULL", "Cull database logs");
}
void cdb_chmod_data(void);
void cdb_checkpoint(void);
void check_handles(void *arg);
+void cdb_cull_logs(void);
+
/*
* Database records beginning with this magic number are assumed to
cprintf(Reply, state, ScheduledShutdown);
}
+/*
+ * 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);
+}
+
+
/*****************************************************************************/
/* MODULE INITIALIZATION STUFF */
CtdlRegisterProtoHook(cmd_down, "DOWN", "perform a server shutdown");
CtdlRegisterProtoHook(cmd_halt, "HALT", "halt the server without exiting the server process");
CtdlRegisterProtoHook(cmd_scdn, "SCDN", "schedule or cancel a server shutdown");
+
+ CtdlRegisterProtoHook(cmd_cull, "CULL", "Cull database logs");
}
/* return our id for the Log */
return "syscmd";