]> code.citadel.org Git - citadel.git/blobdiff - citadel/routines2.c
* Added a sooper-seekrit way to spool network messages to a remote node
[citadel.git] / citadel / routines2.c
index 52e836f1860f92839a2b6398de4b8de755a3567b..94772edbb850253bc9052a1effd81912e21dbbd3 100644 (file)
@@ -1018,7 +1018,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
        int e_ex_code;
        pid_t editor_pid;
        int cksum;
-       int b, i;
+       int b, i, tokens;
        char buf[SIZ];
        char instr[SIZ];
        char addr[SIZ];
@@ -1054,8 +1054,15 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
                        remove_token(listing, 0, '\n');
                        extract(instr, buf, 0);
                        if (!strcasecmp(instr, entrytype)) {
-                               extract(addr, buf, 1);
-                               fprintf(tempfp, "%s\n", addr);
+                               tokens = num_tokens(buf, '|');
+                               for (i=1; i<tokens; ++i) {
+                                       extract(addr, buf, i);
+                                       fprintf(tempfp, "%s", addr);
+                                       if (i < (tokens-1)) {
+                                               fprintf(tempfp, "|");
+                                       }
+                               }
+                               fprintf(tempfp, "\n");
                        }
                }
        }