unsigned int initial_status_sent:1;
unsigned int die_with_master:1;
unsigned int call_avail_overflow:1;
- unsigned int config_path_is_default:1;
+ unsigned int config_path_changed_with_param:1;
unsigned int want_ssl_settings:1;
unsigned int ssl_ctx_initialized:1;
+ unsigned int config_path_from_master:1;
};
void master_service_io_listeners_add(struct master_service *service);
master_service_get_config_path(service);
if (service->config_fd != -1 && input->config_path == NULL &&
- service->config_path_is_default) {
+ !service->config_path_changed_with_param) {
/* use the already opened config socket */
fd = service->config_fd;
service->config_fd = -1;
return fd;
}
- if (service->config_path_is_default && input->config_path == NULL) {
+ if (!service->config_path_from_master &&
+ !service->config_path_changed_with_param &&
+ input->config_path == NULL) {
/* first try to connect to the default config socket.
configuration may contain secrets, so in default config
this fails because the socket is 0600. it's useful for
service->config_fd = -1;
service->config_path = i_strdup(getenv(MASTER_CONFIG_FILE_ENV));
- if (service->config_path == NULL) {
+ if (service->config_path == NULL)
service->config_path = i_strdup(DEFAULT_CONFIG_FILE_PATH);
- service->config_path_is_default = TRUE;
- }
+ else
+ service->config_path_from_master = TRUE;
if ((flags & MASTER_SERVICE_FLAG_STANDALONE) == 0) {
service->version_string = getenv(MASTER_DOVECOT_VERSION_ENV);
switch (opt) {
case 'c':
service->config_path = i_strdup(arg);
- service->config_path_is_default = FALSE;
+ service->config_path_changed_with_param = TRUE;
break;
case 'i':
if (!get_instance_config(arg, &path))
i_fatal("Unknown instance name: %s", arg);
service->config_path = i_strdup(path);
- service->config_path_is_default = FALSE;
+ service->config_path_changed_with_param = TRUE;
break;
case 'k':
service->keep_environment = TRUE;