/*
* This module handles states which are global to the entire server.
*
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2021 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
struct legacy_ctrl_format c;
memset(&c, 0, sizeof(c));
- fp = fopen(file_citadel_control, "rb+");
+ fp = fopen("citadel.control", "rb+");
if (fp != NULL) {
syslog(LOG_INFO, "control: legacy format record found -- importing to db");
fread(&c, sizeof(struct legacy_ctrl_format), 1, fp);
CtdlSetConfigLong( "MMfulltext", c.MMfulltext);
fclose(fp);
- if (unlink(file_citadel_control) != 0) {
- fprintf(stderr, "Unable to remove legacy control record %s after migrating it.\n", file_citadel_control);
+ if (unlink("citadel.control") != 0) {
+ fprintf(stderr, "Unable to remove legacy control record after migrating it.\n");
fprintf(stderr, "Exiting to prevent data corruption.\n");
exit(CTDLEXIT_CONFIG);
}
/*
* CtdlGetCurrentMessageNumber() - Obtain the current highest message number in the system
* This provides a quick way to initialise a variable that might be used to indicate
- * messages that should not be processed. EG. a new Sieve script will use this
+ * messages that should not be processed. For example, an inbox rules script will use this
* to record determine that messages older than this should not be processed.
*
* (Why is this function here? Can't we just go straight to the config variable it fetches?)
/* MODULE INITIALIZATION STUFF */
/*****************************************************************************/
-void control_cleanup(void)
-{
- DeleteHash(&CfgNameHash);
-}
CTDL_MODULE_INIT(control)
{
if (!threading) {
CtdlRegisterProtoHook(cmd_gvdn, "GVDN", "get valid domain names");
CtdlRegisterProtoHook(cmd_conf, "CONF", "get/set system configuration");
- CtdlRegisterCleanupHook(control_cleanup);
-
}
/* return our id for the Log */
return "control";