#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
#include "citadel.h"
#include "server.h"
#include <syslog.h>
-#include <time.h>
#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
#include "tools.h"
-struct oldvisit {
- char v_roomname[ROOMNAMELEN];
- long v_generation;
- long v_lastseen;
- unsigned int v_flags;
-};
-
struct PurgeList {
struct PurgeList *next;
char name[ROOMNAMELEN]; /* use the larger of username or roomname */
age = time(NULL) - (qrbuf->QRmtime);
purge_secs = (time_t)config.c_roompurge * (time_t)86400;
if (purge_secs <= (time_t)0) return;
- lprintf(9, "<%s> is <%ld> seconds old\n", qrbuf->QRname, age);
+ lprintf(9, "<%s> is <%ld> seconds old\n", qrbuf->QRname, (long)age);
if (age > purge_secs) do_purge = 1;
} /* !QR_MAILBOX */
ForEachUser(AddValidUser, NULL);
/* Now traverse through the visits, purging irrelevant records... */
- cdb_begin_transaction();
cdb_rewind(CDB_VISIT);
while(cdbvisit = cdb_next_item(CDB_VISIT), cdbvisit != NULL) {
memset(&vbuf, 0, sizeof(struct visit));
}
- cdb_end_transaction();
-
/* Free the valid room/gen combination list */
while (ValidRoomList != NULL) {
vrptr = ValidRoomList->next;