Fri Oct 23 19:34:38 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* setup.c: default node name is now obtained from uname()
+ * config.c: added put_config()
Wed Oct 21 22:24:48 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Mail rooms now hide their owner-prefix from the client.
strerror(errno));
exit(errno);
}
- cfp=fopen("citadel.config","r");
+ cfp=fopen("citadel.config","rb");
if (cfp==NULL) {
fprintf(stderr, "Cannot start.\n");
fprintf(stderr, "There is no citadel.config in %s\n%s\n",
exit(1);
}
}
+
+
+/*
+ * Occasionally, we will need to write the config file, because some operations
+ * change site-wide parameters.
+ */
+void put_config(void) {
+ FILE *cfp;
+
+ cfp = fopen("citadel.config", "rb+");
+ fwrite((char *)&config, sizeof(struct config), 1, cfp);
+ fclose(cfp);
+ }