X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fcontrol.c;h=2260fa5617e716aec948d95edee1c1b509566206;hb=1248e88ae490d17b4896ada5a74a0a9ea23b365c;hp=6704c3edcbb91e91e32d9ef1550cac39936cee08;hpb=e612033104c17c8adcad19d7dc8efbafa8b33f2e;p=citadel.git diff --git a/citadel/control.c b/citadel/control.c index 6704c3edc..2260fa561 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -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; }