-/* $Id$
+/*
+ * $Id$
*
* This module handles the loading/saving and maintenance of the
* system's Internet configuration. It's not an optional component; I
* wrote it as a module merely to keep things as clean and loosely coupled
* as possible.
+ *
*/
#include "sysdep.h"
#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 <time.h>
#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
void inetcfg_setTo(struct CtdlMessage *msg) {
char *conf;
- char buf[256];
+ char buf[SIZ];
if (msg->cm_fields['M']==NULL) return;
conf = strdoop(msg->cm_fields['M']);
}
-void inetcfg_init_backend(long msgnum) {
+void inetcfg_init_backend(long msgnum, void *userdata) {
struct CtdlMessage *msg;
msg = CtdlFetchMessage(msgnum);
void inetcfg_init(void) {
if (getroom(&CC->quickroom, SYSCONFIGROOM) != 0) return;
- CtdlForEachMessage(MSGS_LAST, 1, INTERNETCFG, NULL,
- inetcfg_init_backend);
+ CtdlForEachMessage(MSGS_LAST, 1, (-127), INTERNETCFG, NULL,
+ inetcfg_init_backend, NULL);
}