* wrote it as a module merely to keep things as clean and loosely coupled
* as possible.
*
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-2021 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
#include <pwd.h>
#include <errno.h>
#include <sys/types.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 <time.h>
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
* This handler detects changes being made to the system's Internet
* configuration.
*/
-int inetcfg_aftersave(struct CtdlMessage *msg, recptypes *recp) {
+int inetcfg_aftersave(struct CtdlMessage *msg, struct recptypes *recp) {
char *ptr;
int linelen;
void inetcfg_init_backend(long msgnum, void *userdata) {
struct CtdlMessage *msg;
- msg = CtdlFetchMessage(msgnum, 1, 1);
+ msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
inetcfg_setTo(msg);
CM_Free(msg);
void inetcfg_init(void) {
+ syslog(LOG_DEBUG, "EVQ: called inetcfg_init()");
if (CtdlGetRoom(&CC->room, SYSCONFIGROOM) != 0) {
return;
}
/*****************************************************************************/
/* MODULE INITIALIZATION STUFF */
/*****************************************************************************/
-void cleanup_inetcfg(void)
-{
- char *buf;
- buf = inetcfg;
- inetcfg = NULL;
- if (buf != NULL) {
- free(buf);
- }
-}
CTDL_MODULE_INIT(inetcfg)
{
CtdlRegisterMessageHook(inetcfg_aftersave, EVT_AFTERSAVE);
inetcfg_init();
- CtdlRegisterCleanupHook(cleanup_inetcfg);
}
/* return our module name for the log */