]> code.citadel.org Git - citadel.git/blobdiff - citadel/control.c
* initiall sieve listing support. authentication works now, we at least answer with...
[citadel.git] / citadel / control.c
index cb3b3f190471b1b723333bfa01f1d52a4f50fb89..7e01f13b1b5b983ce4342a1389fc6b93eee22286 100644 (file)
@@ -60,25 +60,13 @@ void get_control(void)
         */
        memset(&CitControl, 0, sizeof(struct CitControl));
        if (control_fp == NULL) {
-               control_fp = fopen(
-#ifndef HAVE_DATA_DIR
-                                                  "."
-#else
-                                                  DATA_DIR
-#endif
-                                                  "/citadel.control", "rb+");
+               control_fp = fopen(file_citadel_control, "rb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                }
        }
        if (control_fp == NULL) {
-               control_fp = fopen(
-#ifndef HAVE_DATA_DIR
-                                                  "."
-#else
-                                                  DATA_DIR
-#endif
-                                                  "/citadel.control", "wb+");
+               control_fp = fopen(file_citadel_control, "wb+");
                if (control_fp != NULL) {
                        fchown(fileno(control_fp), config.c_ctdluid, -1);
                        memset(&CitControl, 0, sizeof(struct CitControl));
@@ -88,8 +76,9 @@ void get_control(void)
                }
        }
        if (control_fp == NULL) {
-               lprintf(CTDL_ALERT, "ERROR opening citadel.control: %s\n",
-                       strerror(errno));
+               lprintf(CTDL_ALERT, "ERROR opening %s: %s\n",
+                               file_citadel_control,
+                               strerror(errno));
                return;
        }
 
@@ -229,6 +218,12 @@ void cmd_conf(char *argbuf)
                cprintf("%d\n", config.c_auto_cull);
                cprintf("%d\n", config.c_instant_expunge);
                cprintf("%d\n", config.c_allow_spoofing);
+               cprintf("%d\n", config.c_journal_email);
+               cprintf("%d\n", config.c_journal_pubmsgs);
+               cprintf("%s\n", config.c_journal_dest);
+               cprintf("%s\n", config.c_default_cal_zone);
+               cprintf("%d\n", config.c_pftcpdict_port);
+               cprintf("%d\n", config.c_managesieve_port);
                cprintf("000\n");
        }
 
@@ -415,6 +410,25 @@ void cmd_conf(char *argbuf)
                        case 45:
                                config.c_allow_spoofing = atoi(buf);
                                break;
+                       case 46:
+                               config.c_journal_email = atoi(buf);
+                               break;
+                       case 47:
+                               config.c_journal_pubmsgs = atoi(buf);
+                               break;
+                       case 48:
+                               safestrncpy(config.c_journal_dest, buf,
+                                               sizeof config.c_journal_dest);
+                       case 49:
+                               safestrncpy(config.c_default_cal_zone, buf,
+                                               sizeof config.c_default_cal_zone);
+                               break;
+                       case 50:
+                               config.c_pftcpdict_port = atoi(buf);
+                               break;
+                       case 51:
+                               config.c_managesieve_port = atoi(buf);
+                               break;
                        }
                        ++a;
                }
@@ -430,7 +444,7 @@ void cmd_conf(char *argbuf)
                /* If full text indexing has been disabled, invalidate the
                 * index so it doesn't try to use it later.
                 */
-               if (!config.c_enable_fulltext == 0) {
+               if (config.c_enable_fulltext == 0) {
                        CitControl.fulltext_wordbreaker = 0;
                        put_control();
                }