setting.
$Log$
+Revision 651.2 2005/06/22 03:03:34 ajc
+* Automatic deletion of committed database logs is now a site-definable
+ setting.
+
Revision 651.1 2005/06/16 02:42:58 ajc
* There is now a dedicated thread for doing database checkpoints.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 651 /* This version */
+#define REV_LEVEL 652 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
-#define EXPORT_REV_MIN 651 /* Oldest compatible export files */
+#define EXPORT_REV_MIN 652 /* Oldest compatible export files */
#define SERVER_TYPE 0 /* zero for stock Citadel; other developers please
obtain SERVER_TYPE codes for your implementations */
int c_imaps_port; /* IMAPS listener port (usually 993)*/
int c_pop3s_port; /* POP3S listener port (usually 995)*/
int c_smtps_port; /* SMTPS listener port (usually 465)*/
+ char c_auto_cull; /* Cull db logs automatically? */
};
cprintf("%d\n", config.c_pop3s_port);
cprintf("%d\n", config.c_smtps_port);
cprintf("%d\n", config.c_enable_fulltext);
+ cprintf("%d\n", config.c_auto_cull);
cprintf("000\n");
}
case 42:
config.c_enable_fulltext = atoi(buf);
break;
+ case 43:
+ config.c_auto_cull = atoi(buf);
+ break;
}
++a;
}
}
/* After a successful checkpoint, we can cull the unused logs */
- cdb_cull_logs();
+ if (config.c_auto_cull) {
+ cdb_cull_logs();
+ }
}
void do_system_configuration(CtdlIPC *ipc)
{
-#define NUM_CONFIGS 43
+#define NUM_CONFIGS 44
char buf[SIZ];
char sc[NUM_CONFIGS][256];
strprompt("Maximum message length", &sc[20][0], 20);
strprompt("Minimum number of worker threads", &sc[21][0], 3);
strprompt("Maximum number of worker threads", &sc[22][0], 3);
+ snprintf(sc[43], sizeof sc[43], "%d", (boolprompt(
+ "Automatically delete committed database logs",
+ atoi(&sc[43][0]))));
strprompt("Server IP address (0.0.0.0 for 'any')", &sc[37][0], 15);
strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
config.c_enable_fulltext = 0;
}
+ if (CitControl.version < 652) {
+ config.c_auto_cull = 1;
+ }
+
put_config();
}
cprintf("%d\n", config.c_disable_newu);
cprintf("%s\n", config.c_baseroom);
cprintf("%s\n", config.c_aideroom);
+ cprintf("%d\n", config.c_auto_cull);
/* Export the control file */
get_control();
client_getln(buf, sizeof buf); config.c_disable_newu = atoi(buf);
client_getln(config.c_baseroom, sizeof config.c_baseroom);
client_getln(config.c_aideroom, sizeof config.c_aideroom);
+ client_getln(buf, sizeof buf); config.c_auto_cull = atoi(buf);
config.c_enable_fulltext = 0; /* always disable */
put_config();
lprintf(CTDL_INFO, "Imported config file\n");