]> code.citadel.org Git - citadel.git/blobdiff - citadel/routines2.c
Patches submitted by matt:
[citadel.git] / citadel / routines2.c
index f20add33f8a18c3f2e24fa83974345c216879f65..07012ab1a6f16a306415aa744100ad12bf9525d3 100644 (file)
@@ -592,7 +592,7 @@ void list_bio(CtdlIPC *ipc)
                pprintf("%s\n", buf);
                return;
        }
-       while (strlen(resp)) {
+       while (resp && strlen(resp)) {
                extract_token(buf, resp, 0, '\n', sizeof buf);
                remove_token(resp, 0, '\n');
                if ((pos + strlen(buf) + 5) > screenwidth) {
@@ -644,7 +644,7 @@ void read_bio(CtdlIPC *ipc)
 void do_system_configuration(CtdlIPC *ipc)
 {
 
-#define NUM_CONFIGS 49
+#define NUM_CONFIGS 52
 
        char buf[SIZ];
        char sc[NUM_CONFIGS][256];
@@ -743,6 +743,8 @@ void do_system_configuration(CtdlIPC *ipc)
        strprompt("SMTP MTA server port (-1 to disable)", &sc[24][0], 5);
        strprompt("SMTP MSA server port (-1 to disable)", &sc[38][0], 5);
        strprompt("SMTPS server port (-1 to disable)", &sc[41][0], 5);
+       strprompt("Postfix TCP Dictionary Port server port (-1 to disable)", &sc[50][0], 5);
+       strprompt("ManageSieve server port (-1 to disable)", &sc[51][0], 5);
 
        /* This logic flips the question around, because it's one of those
         * situations where 0=yes and 1=no
@@ -1118,19 +1120,20 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
        }
 
        if (file_checksum(filename) == cksum) {
-               err_printf("*** Not saving changes.\n");
+               err_printf("*** No changes to save.\n");
                e_ex_code = 1;
        }
 
        if (e_ex_code == 0) {           /* Save changes */
                changefp = fopen(changefile, "w");
+               /* This appears completely unnecessary; why was it here? -IO
                r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
                if (r / 100 == 1) {
                        while(listing && strlen(listing)) {
                                extract_token(buf, listing, 0, '\n', sizeof buf);
                                remove_token(listing, 0, '\n');
                                extract_token(instr, buf, 0, '|', sizeof instr);
-                               if (strcasecmp(instr, entrytype)) {
+                               if (!strcasecmp(instr, entrytype)) {
                                        fprintf(changefp, "%s\n", buf);
                                }
                        }
@@ -1139,6 +1142,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
                        free(listing);
                        listing = NULL;
                }
+               */
                tempfp = fopen(filename, "r");
                while (fgets(buf, sizeof buf, tempfp) != NULL) {
                        for (i=0; i<strlen(buf); ++i) {