]> code.citadel.org Git - citadel.git/commitdiff
Fixed the MSIV GETSCRIPT command ... it was failing
authorArt Cancro <ajc@citadel.org>
Thu, 16 Nov 2006 04:24:27 +0000 (04:24 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 16 Nov 2006 04:24:27 +0000 (04:24 +0000)
to output the entirety of scripts larger than 1024 bytes

citadel/serv_sieve.c

index 109ed84c72396bdaa332c4f091a2869aafb0a89f..b8af8e574953ae2969e0bc66eb6a938357c41468 100644 (file)
@@ -1110,8 +1110,15 @@ void cmd_msiv(char *argbuf) {
                extract_token(script_name, argbuf, 1, '|', sizeof script_name);
                script_content = msiv_getscript(&u, script_name);
                if (script_content != NULL) {
+                       int script_len;
+
                        cprintf("%d Script:\n", LISTING_FOLLOWS);
-                       cprintf("%s000\n", script_content);
+                       script_len = strlen(script_content);
+                       client_write(script_content, script_len);
+                       if (script_content[script_len-1] != '\n') {
+                               cprintf("\n");
+                       }
+                       cprintf("000\n");
                }
                else {
                        cprintf("%d Invalid script name.\n", ERROR + ILLEGAL_VALUE);