/* Verbose logging callback */
void cdb_verbose_err(const DB_ENV *dbenv, const char *errpfx, const char *msg)
{
- CtdlLogPrintf(CTDL_ALERT, "BDB: %s\n", msg);
+ CtdlLogPrintf(CTDL_ALERT, "DB: %s\n", msg);
}
/*
- * Request a checkpoint of the database.
+ * Request a checkpoint of the database. Called once per minute by the thread manager.
*/
void cdb_checkpoint(void)
{
int ret;
-// static time_t last_run = 0L;
-
- /* Only do a checkpoint once per minute. */
-/*
- * Don't need this any more, since the thread that calls us sleeps for 60 seconds between calls
-
- if ((time(NULL) - last_run) < 60L) {
- return;
- }
- last_run = time(NULL);
-*/
CtdlLogPrintf(CTDL_DEBUG, "-- db checkpoint --\n");
ret = dbenv->txn_checkpoint(dbenv,
{
int ret;
int i;
- char dbfilename[SIZ];
+ char dbfilename[32];
u_int32_t flags = 0;
int dbversion_major, dbversion_minor, dbversion_patch;
int current_dbversion = 0;
{
int conflict_reported = 0;
- /* debugging cruft *
+ /* debugging cruft */
time_t tt;
tt = icaltime_as_timet(t1start);
CtdlLogPrintf(CTDL_DEBUG, "PROPOSED START: %s", ctime(&tt));
CtdlLogPrintf(CTDL_DEBUG, "EXISTING START: %s", ctime(&tt));
tt = icaltime_as_timet(t2end);
CtdlLogPrintf(CTDL_DEBUG, " EXISTING END: %s", ctime(&tt));
- * debugging cruft */
+ /* debugging cruft */
/* compare and output */