#include <limits.h>
#include "citadel.h"
#include "server.h"
-#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "control.h"
-#include "serv_extensions.h"
#include "database.h"
#include "room_ops.h"
#include "user_ops.h"
#include "msgbase.h"
#include "tools.h"
#include "serv_upgrade.h"
+#include "euidindex.h"
+#include "ctdl_module.h"
+
/*
* Back end processing function for cmd_bmbx
*/
if (qrbuf != NULL) {
ptr = (struct RoomProcList *)
- mallok(sizeof (struct RoomProcList));
+ malloc(sizeof (struct RoomProcList));
if (ptr == NULL) return;
safestrncpy(ptr->name, qrbuf->QRname, sizeof ptr->name);
ptr = rplist;
rplist = rplist->next;
- phree(ptr);
+ free(ptr);
}
}
/*
- * Back end processing function for convert_bbsuid_to_minusone()
+ * Back end processing function for convert_ctdluid_to_minusone()
*/
void cbtm_backend(struct ctdluser *usbuf, void *data) {
static struct UserProcList *uplist = NULL;
*/
if (usbuf != NULL) {
ptr = (struct UserProcList *)
- mallok(sizeof (struct UserProcList));
+ malloc(sizeof (struct UserProcList));
if (ptr == NULL) return;
safestrncpy(ptr->user, usbuf->fullname, sizeof ptr->user);
if (lgetuser(&us, uplist->user) == 0) {
lprintf(CTDL_DEBUG, "Processing <%s>...\n", uplist->user);
- if (us.uid == BBSUID) {
+ if (us.uid == CTDLUID) {
us.uid = (-1);
}
lputuser(&us);
ptr = uplist;
uplist = uplist->next;
- phree(ptr);
+ free(ptr);
}
}
/*
- * quick fix to change all BBSUID users to (-1)
+ * quick fix to change all CTDLUID users to (-1)
*/
-void convert_bbsuid_to_minusone(void) {
+void convert_ctdluid_to_minusone(void) {
lprintf(CTDL_WARNING, "Applying uid changes\n");
ForEachUser(cbtm_backend, NULL);
cbtm_backend(NULL, NULL);
config.c_ldap_port = 389;
}
+ if (CitControl.version < 623) {
+ strcpy(config.c_ip_addr, "0.0.0.0");
+ }
+
+ if (CitControl.version < 650) {
+ config.c_enable_fulltext = 0;
+ }
+
+ if (CitControl.version < 652) {
+ config.c_auto_cull = 1;
+ }
+
put_config();
}
bump_mailbox_generation_numbers();
}
if ((CitControl.version > 000) && (CitControl.version < 608)) {
- convert_bbsuid_to_minusone();
+ convert_ctdluid_to_minusone();
+ }
+ if ((CitControl.version > 000) && (CitControl.version < 659)) {
+ rebuild_euid_index();
}
CitControl.version = REV_LEVEL;
}
-char *serv_upgrade_init(void)
+CTDL_MODULE_INIT(upgrade)
{
check_server_upgrades();
+
+ /* return our Subversion id for the Log */
return "$Id$";
}