gdbm_reorganize(gdbms[CDB_MSGMAIN]);
end_critical_section(S_MSGMAIN);
- /* defrag the user file and mailboxes */
+ /* defrag the user file, mailboxes, and user/room relationships */
begin_critical_section(S_USERSUPP);
gdbm_reorganize(gdbms[CDB_USERSUPP]);
gdbm_reorganize(gdbms[CDB_MAILBOXES]);
+ gdbm_reorganize(gdbms[CDB_VISIT]);
end_critical_section(S_USERSUPP);
/* defrag the room files and message lists */
gdbm_strerror(gdbm_errno));
}
+ gdbms[CDB_VISIT] = gdbm_open("data/visit.gdbm", 0,
+ GDBM_WRCREAT, 0600, NULL);
+ if (gdbms[CDB_VISIT] == NULL) {
+ lprintf(2, "Cannot open visit file: %s\n",
+ gdbm_strerror(gdbm_errno));
+ }
+
gdbms[CDB_QUICKROOM] = gdbm_open("data/quickroom.gdbm", 0,
GDBM_WRCREAT, 0600, NULL);
if (gdbms[CDB_QUICKROOM] == NULL) {
/*
* Citadel DataBases (define one for each cdb we need to open)
*/
-#define CDB_MSGMAIN 0 /* message base */
-#define CDB_USERSUPP 1 /* user file */
-#define CDB_QUICKROOM 2 /* room index */
-#define CDB_FLOORTAB 3 /* floor index */
-#define CDB_MSGLISTS 4 /* room message lists */
-#define CDB_MAILBOXES 5 /* mailbox message lists */
-#define MAXCDB 6 /* total number of CDB's defined */
+#define CDB_MSGMAIN 0 /* message base */
+#define CDB_USERSUPP 1 /* user file */
+#define CDB_QUICKROOM 2 /* room index */
+#define CDB_FLOORTAB 3 /* floor index */
+#define CDB_MSGLISTS 4 /* room message lists */
+#define CDB_MAILBOXES 5 /* mailbox message lists */
+#define CDB_VISIT 6 /* user/room relationships */
+#define MAXCDB 7 /* total number of CDB's defined */
struct cdbdata {
size_t len;