]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_upgrade.c
* Variable names, comments, documentation, etc... removed the acronym 'BBS'
[citadel.git] / citadel / serv_upgrade.c
index 47396e1b825353a0cf5846a40b2b43d81ad3f787..8abbad180bbffc8e5d6437da80b3de9b4b181041 100644 (file)
@@ -60,7 +60,7 @@ void cmd_bmbx_backend(struct ctdlroom *qrbuf, void *data) {
         */
        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);
@@ -86,7 +86,7 @@ void cmd_bmbx_backend(struct ctdlroom *qrbuf, void *data) {
 
                ptr = rplist;
                rplist = rplist->next;
-               phree(ptr);
+               free(ptr);
        }
 }
 
@@ -102,7 +102,7 @@ void bump_mailbox_generation_numbers(void) {
 
 
 /* 
- * 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;
@@ -115,7 +115,7 @@ void cbtm_backend(struct ctdluser *usbuf, void *data) {
         */
        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);
@@ -128,7 +128,7 @@ void cbtm_backend(struct ctdluser *usbuf, void *data) {
 
                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);
@@ -136,14 +136,14 @@ void cbtm_backend(struct ctdluser *usbuf, void *data) {
 
                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);
@@ -168,6 +168,10 @@ void update_config(void) {
                config.c_ldap_port = 389;
        }
 
+       if (CitControl.version < 623) {
+               strcpy(config.c_ip_addr, "0.0.0.0");
+       }
+
        put_config();
 }
 
@@ -202,7 +206,7 @@ void check_server_upgrades(void) {
                bump_mailbox_generation_numbers();
        }
        if ((CitControl.version > 000) && (CitControl.version < 608)) {
-               convert_bbsuid_to_minusone();
+               convert_ctdluid_to_minusone();
        }
 
        CitControl.version = REV_LEVEL;