From 00aa5f187b2c9707828c3f1a6c808630aff8f933 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 29 Jun 2003 03:58:41 +0000 Subject: [PATCH] * 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. --- citadel/ChangeLog | 6 ++++++ citadel/citadel.h | 30 +++++++++++++++++++++++------- citadel/serv_vandelay.c | 6 +----- citadel/setup.c | 3 --- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index d5d920f8e..1b3116344 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/citadel.h b/citadel/citadel.h index 038a17f6e..97e348202 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -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 */ diff --git a/citadel/serv_vandelay.c b/citadel/serv_vandelay.c index f53c9626f..bf1368b61 100644 --- a/citadel/serv_vandelay.c +++ b/citadel/serv_vandelay.c @@ -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 ((versionREV_LEVEL)) { lprintf(7, "Version mismatch - aborting\n"); break; } diff --git a/citadel/setup.c b/citadel/setup.c index 41e5e6b7c..13609928b 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -760,8 +760,6 @@ int main(int argc, char *argv[]) strcpy(config.c_moreprompt, ""); 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"); -- 2.39.2