]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_inetcfg.c
* extract_token() now expects to be supplied with the size of the
[citadel.git] / citadel / serv_inetcfg.c
index af7f35dfbe4602e3e482623b51d30d611095af4a..89b5e5d66bdbd925e9ab0ae56096045f07320520 100644 (file)
@@ -61,7 +61,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 +93,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;
@@ -142,7 +142,7 @@ int inetcfg_aftersave(struct CtdlMessage *msg) {
 void inetcfg_init_backend(long msgnum, void *userdata) {
        struct CtdlMessage *msg;
 
-               msg = CtdlFetchMessage(msgnum);
+               msg = CtdlFetchMessage(msgnum, 1);
                if (msg != NULL) {
                inetcfg_setTo(msg);
                        CtdlFreeMessage(msg);
@@ -154,7 +154,7 @@ void inetcfg_init_backend(long msgnum, void *userdata) {
 void spamstrings_init_backend(long msgnum, void *userdata) {
        struct CtdlMessage *msg;
 
-               msg = CtdlFetchMessage(msgnum);
+               msg = CtdlFetchMessage(msgnum, 1);
                if (msg != NULL) {
                spamstrings_setTo(msg);
                        CtdlFreeMessage(msg);