]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_inetcfg.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_inetcfg.c
index 93ff9990f590fd2c93fdca1e58546008dd95bbc8..eaab32d370102438debb031c02257f72813cc933 100644 (file)
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
-#include "serv_extensions.h"
 #include "room_ops.h"
 #include "user_ops.h"
 #include "policy.h"
@@ -50,6 +48,7 @@
 #include "domain.h"
 
 
+#include "ctdl_module.h"
 
 
 void inetcfg_setTo(struct CtdlMessage *msg) {
@@ -61,7 +60,7 @@ void inetcfg_setTo(struct CtdlMessage *msg) {
 
        if (conf != NULL) {
                do {
-                       extract_token(buf, conf, 0, '\n');
+                       extract_token(buf, conf, 0, '\n', sizeof buf);
                        strcpy(conf, &conf[strlen(buf)+1]);
                } while ( (strlen(conf)>0) && (strlen(buf)>0) );
 
@@ -93,7 +92,7 @@ void spamstrings_setTo(struct CtdlMessage *msg) {
 
        n = num_tokens(conf, '\n');
        for (i=0; i<n; ++i) {
-               extract_token(buf, conf, i, '\n');
+               extract_token(buf, conf, i, '\n', sizeof buf);
                sptr = malloc(sizeof(struct spamstrings_t));
                sptr->string = strdup(buf);
                sptr->next = spamstrings;
@@ -165,7 +164,7 @@ void spamstrings_init_backend(long msgnum, void *userdata) {
 
 void inetcfg_init(void) {
        if (getroom(&CC->room, SYSCONFIGROOM) != 0) return;
-       CtdlForEachMessage(MSGS_LAST, 1, INTERNETCFG, NULL,
+       CtdlForEachMessage(MSGS_LAST, 1, NULL, INTERNETCFG, NULL,
                inetcfg_init_backend, NULL);
 }
 
@@ -177,10 +176,12 @@ void inetcfg_init(void) {
 /*****************************************************************************/
 
 
-char *serv_inetcfg_init(void)
+CTDL_MODULE_INIT(inetcfg)
 {
        CtdlRegisterMessageHook(inetcfg_aftersave, EVT_AFTERSAVE);
        inetcfg_init();
+
+       /* return our Subversion id for the Log */
        return "$Id$";
 }