* Renamed fields in 'struct config' which are no longer relevant (but kept
authorArt Cancro <ajc@citadel.org>
Sun, 29 Jun 2003 03:58:41 +0000 (03:58 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 29 Jun 2003 03:58:41 +0000 (03:58 +0000)
  them in place to avoid corrupting everyone's data files).  Removed them
  entirely from serv_vandelay.c.

citadel/ChangeLog
citadel/citadel.h
citadel/serv_vandelay.c
citadel/setup.c

index d5d920f8e97bfa3da0e39645797fdbe1fdaf8101..1b311634409e7b488ea19240d2599439a19c4e9e 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 607.11  2003/06/29 03:58:41  ajc
+ * Renamed fields in 'struct config' which are no longer relevant (but kept
+   them in place to avoid corrupting everyone's data files).  Removed them
+   entirely from serv_vandelay.c.
+
  Revision 607.10  2003/06/28 05:12:56  ajc
  * Bump internal version number to 6.08
  * Use (-1) instead of BBSUID as the uid of user records which exist only
@@ -4803,3 +4808,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 038a17f6e1217af939a6942d19c3b1160b3ae0d5..97e3482020d3a32d2f10c2fc48fc49becbf0861d 100644 (file)
@@ -39,10 +39,14 @@ extern "C" {
  * to fiddle with the decimal).  REV_MIN is the oldest version of Citadel
  * whose data files are compatible with the current version.  If the data files
  * are older than REV_MIN, none of the programs will work until the setup
- * program is run again to bring things up to date.
+ * program is run again to bring things up to date.  EXPORT_REV_MIN is the
+ * oldest version of Citadel whose export files we can read.  The latter is
+ * usually more strict because you're not really supposed to dump/load and
+ * upgrade at the same time.
  */
 #define REV_LEVEL      608             /* This version */
-#define REV_MIN                591             /* Oldest compatible version */
+#define REV_MIN                591             /* Oldest compatible database */
+#define EXPORT_REV_MIN 608             /* Oldest compatible export files */
 
 #define SERVER_TYPE 0  /* zero for stock Citadel/UX; other developers please
                           obtain SERVER_TYPE codes for your implementations */
@@ -75,7 +79,12 @@ struct ExpirePolicy {
 
 
 /* 
- * Global system configuration 
+ * Global system configuration.
+ * 
+ * Developers: please do NOT remove the fields labelled "not in use".  We
+ * can't simply remove them from the struct, because that would render the
+ * configs on existing systems corrupt.  However, if you need the same number
+ * of bytes for a *new* field, feel free to use them.
  */
 struct config {
        char c_nodename[16];            /* Unqualified "short" nodename     */
@@ -91,10 +100,10 @@ struct config {
        char c_twitroom[ROOMNAMELEN];   /* twit detect msg move to room     */
        char c_moreprompt[80];          /* paginator prompt                 */
        char c_restrict;                /* restrict Internet mail flag      */
-       long c_msgbase;                 /* size of message base (obsolete)  */
+       long c_niu_1;                   /* (not in use)                     */
        char c_bbs_city[32];            /* physical location of server      */
        char c_sysadm[26];              /* name of system administrator     */
-       char c_bucket_dir[15];          /* bit bucket for files...          */
+       char c_niu_2[15];               /* (not in use)                     */
        int c_setup_level;              /* what rev level we've setup to    */
        int c_maxsessions;              /* maximum concurrent sessions      */
        char c_net_password[20];        /* system net password (obsolete)   */
@@ -120,6 +129,11 @@ struct config {
        char c_aideroom[ROOMNAMELEN];   /* Name of aideroom (Aide)          */
 };
 
+/*
+ * This struct stores a list of rooms with new messages which the client
+ * fetches from the server.  This allows the client to "march" through
+ * relevant rooms without having to ask the server each time where to go next.
+ */
 struct march {
        struct march *next;
        char march_name[ROOMNAMELEN];
@@ -142,7 +156,8 @@ struct march {
 #define RESTRICT_INTERNET      config.c_restrict
 
 /*
- * User records
+ * User records.  (It's called "usersupp" because in ancient times it was
+ * a supplement to /etc/passwd, but not anymore.)
  */
 struct usersupp {                      /* User record                      */
        int version;                    /* Cit vers. which created this rec */
@@ -179,7 +194,8 @@ struct CitControl {
 #define MM_VALID       4               /* New users need validating        */
 
 /*
- * Room records
+ * Room records.  (It's called "quickroom" because it was once merely an
+ * index to a "fullroom" file, but the new database layout changed everything.)
  */
 struct quickroom {
        char QRname[ROOMNAMELEN];       /* Name of room                     */
index f53c9626f46d07c323af46e4b40878793982442a..bf1368b61011ff670a6ae92b0ff86ba7e9497b1b 100644 (file)
@@ -265,10 +265,8 @@ void artv_do_export(void) {
        cprintf("%s\n", config.c_twitroom);
        cprintf("%s\n", config.c_moreprompt);
        cprintf("%d\n", config.c_restrict);
-       cprintf("%ld\n", config.c_msgbase);
        cprintf("%s\n", config.c_bbs_city);
        cprintf("%s\n", config.c_sysadm);
-       cprintf("%s\n", config.c_bucket_dir);
        cprintf("%d\n", config.c_setup_level);
        cprintf("%d\n", config.c_maxsessions);
        cprintf("%s\n", config.c_net_password);
@@ -324,11 +322,9 @@ void artv_import_config(void) {
        client_gets(config.c_twitroom);
        client_gets(config.c_moreprompt);
        client_gets(buf);       config.c_restrict = atoi(buf);
-       client_gets(buf);       config.c_msgbase = atol(buf);
        client_gets(config.c_bbs_city);
        client_gets(config.c_sysadm);
        lprintf(9, "c_sysadm = %s\n", config.c_sysadm);
-       client_gets(config.c_bucket_dir);
        client_gets(buf);       config.c_setup_level = atoi(buf);
        client_gets(buf);       config.c_maxsessions = atoi(buf);
        client_gets(config.c_net_password);
@@ -524,7 +520,7 @@ void artv_do_import(void) {
                if (!strcasecmp(buf, "version")) {
                        client_gets(s_version);
                        version = atoi(s_version);
-                       if ((version < REV_MIN) || (version > REV_LEVEL)) {
+                       if ((version<EXPORT_REV_MIN) || (version>REV_LEVEL)) {
                                lprintf(7, "Version mismatch - aborting\n");
                                break;
                        }
index 41e5e6b7c9f74b840c4830396d245623c13e43ef..13609928b6f8eb02820422a5be9ea9e835fe278b 100644 (file)
@@ -760,8 +760,6 @@ int main(int argc, char *argv[])
                strcpy(config.c_moreprompt, "<more>");
        if (strlen(config.c_twitroom) == 0)
                strcpy(config.c_twitroom, "Trashcan");
-       if (strlen(config.c_bucket_dir) == 0)
-               strcpy(config.c_bucket_dir, "bitbucket");
        if (strlen(config.c_net_password) == 0)
                strcpy(config.c_net_password, "netpassword");
        if (strlen(config.c_baseroom) == 0)
@@ -877,7 +875,6 @@ NEW_INST:
        mkdir("help", 0700);
        mkdir("images", 0700);
        mkdir("netconfigs", 0700);
-       mkdir(config.c_bucket_dir, 0700);
 
        /* Delete a bunch of old files from Citadel v4; don't need anymore */
        system("rm -fr ./chatpipes ./expressmsgs ./sessions 2>/dev/null");