dovecot-2.2: lib-master: Fixed -c & -i command line parameters w...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 9 14:10:14 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/8b5664bce4a0
changeset: 17765:8b5664bce4a0
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 09 17:09:30 2014 +0300
description:
lib-master: Fixed -c & -i command line parameters when config socket was readable.
The config socket was always being read, even if another config file was
attempted to be used.
diffstat:
src/lib-master/master-service-settings.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r bf1faf8ab847 -r 8b5664bce4a0 src/lib-master/master-service-settings.c
--- a/src/lib-master/master-service-settings.c Mon Sep 08 18:11:31 2014 +0300
+++ b/src/lib-master/master-service-settings.c Tue Sep 09 17:09:30 2014 +0300
@@ -177,7 +177,8 @@
*path_r = path = input->config_path != NULL ? input->config_path :
master_service_get_config_path(service);
- if (service->config_fd != -1 && input->config_path == NULL) {
+ if (service->config_fd != -1 && input->config_path == NULL &&
+ service->config_path_is_default) {
/* use the already opened config socket */
fd = service->config_fd;
service->config_fd = -1;
@@ -344,6 +345,12 @@
const char *path, *error;
int fd;
+ /* we'll get here before command line parameters have been parsed,
+ so -O, -c and -i parameters haven't been handled yet at this point.
+ this means we could end up opening config socket connection
+ unnecessarily, but this isn't a problem. we'll just have to
+ ignore it later on. (unfortunately there isn't a master_service_*()
+ call where this function would be better called.) */
if (getenv("DOVECONF_ENV") != NULL ||
(service->flags & MASTER_SERVICE_FLAG_NO_CONFIG_SETTINGS) != 0)
return;
More information about the dovecot-cvs
mailing list