]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/upgrade/serv_upgrade.c
Begin removing the decimal point from our version number (901 instead of 9.01)
[citadel.git] / citadel / modules / upgrade / serv_upgrade.c
index 06eb8bcae613b8d47eb1749085c5c55b91f664f0..249c825053524575e3bf5b990a442bf9d88fc111 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Transparently handle the upgrading of server data formats.
  *
- * Copyright (c) 1987-2015 by the citadel.org team
+ * Copyright (c) 1987-2016 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.
@@ -94,60 +94,6 @@ void fix_sys_user_name(void)
 }
 
 
-/* 
- * Back end processing function for cmd_bmbx
- */
-void cmd_bmbx_backend(struct ctdlroom *qrbuf, void *data) {
-       static struct RoomProcList *rplist = NULL;
-       struct RoomProcList *ptr;
-       struct ctdlroom qr;
-
-       /* Lazy programming here.  Call this function as a CtdlForEachRoom backend
-        * in order to queue up the room names, or call it with a null room
-        * to make it do the processing.
-        */
-       if (qrbuf != NULL) {
-               ptr = (struct RoomProcList *) malloc(sizeof (struct RoomProcList));
-               if (ptr == NULL) return;
-
-               safestrncpy(ptr->name, qrbuf->QRname, sizeof ptr->name);
-               ptr->next = rplist;
-               rplist = ptr;
-               return;
-       }
-
-       while (rplist != NULL) {
-
-               if (CtdlGetRoomLock(&qr, rplist->name) == 0) {
-                       syslog(LOG_DEBUG, "Processing <%s>...", rplist->name);
-                       if ( (qr.QRflags & QR_MAILBOX) == 0) {
-                               syslog(LOG_DEBUG, "  -- not a mailbox");
-                       }
-                       else {
-
-                               qr.QRgen = time(NULL);
-                               syslog(LOG_DEBUG, "  -- fixed!");
-                       }
-                       CtdlPutRoomLock(&qr);
-               }
-
-               ptr = rplist;
-               rplist = rplist->next;
-               free(ptr);
-       }
-}
-
-/*
- * quick fix to bump mailbox generation numbers
- */
-void bump_mailbox_generation_numbers(void) {
-       syslog(LOG_WARNING, "Applying security fix to mailbox rooms");
-       CtdlForEachRoom(cmd_bmbx_backend, NULL);
-       cmd_bmbx_backend(NULL, NULL);
-       return;
-}
-
-
 /* 
  * Back end processing function for convert_ctdluid_to_minusone()
  */
@@ -310,10 +256,7 @@ void update_config(void) {
  */
 void check_server_upgrades(void) {
 
-       syslog(LOG_INFO, "Existing database version on disk is %d.%02d",
-               (CtdlGetConfigInt("MM_hosted_upgrade_level") / 100),
-               (CtdlGetConfigInt("MM_hosted_upgrade_level") % 100)
-       );
+       syslog(LOG_INFO, "Existing database version on disk is %d", CtdlGetConfigInt("MM_hosted_upgrade_level"));
 
        if (CtdlGetConfigInt("MM_hosted_upgrade_level") < REV_LEVEL) {
                syslog(LOG_WARNING,
@@ -326,13 +269,10 @@ void check_server_upgrades(void) {
 
        update_config();
 
-       if ((CtdlGetConfigInt("MM_hosted_upgrade_level") > 000) && (CtdlGetConfigInt("MM_hosted_upgrade_level") < 555)) {
+       if ((CtdlGetConfigInt("MM_hosted_upgrade_level") > 000) && (CtdlGetConfigInt("MM_hosted_upgrade_level") < 591)) {
                syslog(LOG_EMERG, "This database is too old to be upgraded.  Citadel server will exit.");
                exit(EXIT_FAILURE);
        }
-       if ((CtdlGetConfigInt("MM_hosted_upgrade_level") > 000) && (CtdlGetConfigInt("MM_hosted_upgrade_level") < 591)) {
-               bump_mailbox_generation_numbers();
-       }
        if ((CtdlGetConfigInt("MM_hosted_upgrade_level") > 000) && (CtdlGetConfigInt("MM_hosted_upgrade_level") < 608)) {
                convert_ctdluid_to_minusone();
        }