]> code.citadel.org Git - citadel.git/blobdiff - citadel/control.c
* Applied a patch sent in by Wilfried Goesgens which allows the various
[citadel.git] / citadel / control.c
index 93d8963c55defc6fc6007f4957eccfd4767d7157..bad2a68d3ab893c4765d66f77af0072fe5df6fd6 100644 (file)
@@ -64,13 +64,25 @@ void get_control(void)
         */
        memset(&CitControl, 0, sizeof(struct CitControl));
        if (control_fp == NULL) {
-               control_fp = fopen("citadel.control", "rb+");
+               control_fp = fopen(
+#ifndef HAVE_RUN_DIR
+                                                  "."
+#else
+                                                  RUN_DIR
+#endif
+                                                  "/citadel.control", "rb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                }
        }
        if (control_fp == NULL) {
-               control_fp = fopen("citadel.control", "wb+");
+               control_fp = fopen(
+#ifndef HAVE_RUN_DIR
+                                                  "."
+#else
+                                                  RUN_DIR
+#endif
+                                                  "/citadel.control", "wb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                        memset(&CitControl, 0, sizeof(struct CitControl));
@@ -215,6 +227,7 @@ void cmd_conf(char *argbuf)
                cprintf("%d\n", config.c_pop3s_port);
                cprintf("%d\n", config.c_smtps_port);
                cprintf("%d\n", config.c_enable_fulltext);
+               cprintf("%d\n", config.c_auto_cull);
                cprintf("000\n");
        }
 
@@ -392,6 +405,9 @@ void cmd_conf(char *argbuf)
                        case 42:
                                config.c_enable_fulltext = atoi(buf);
                                break;
+                       case 43:
+                               config.c_auto_cull = atoi(buf);
+                               break;
                        }
                        ++a;
                }