dovecot-2.1: master: Fixed giving config socket path to anvil pr...

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 7 20:35:42 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/9da49294f49d
changeset: 13667:9da49294f49d
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 07 20:45:55 2011 +0200
description:
master: Fixed giving config socket path to anvil process.

diffstat:

 src/master/service-process.c |  19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diffs (49 lines):

diff -r 3ecd119bd63b -r 9da49294f49d src/master/service-process.c
--- a/src/master/service-process.c	Sat Nov 05 20:35:56 2011 +0200
+++ b/src/master/service-process.c	Mon Nov 07 20:45:55 2011 +0200
@@ -180,18 +180,11 @@
 	}
 }
 
-static void
-service_process_setup_environment(struct service *service, unsigned int uid)
+static void service_rpocess_setup_config_environment(struct service *service)
 {
 	const struct master_service_settings *set = service->list->service_set;
 
-	master_service_env_clean();
-
 	switch (service->type) {
-	case SERVICE_TYPE_ANVIL:
-		if (service_anvil_global->restarted)
-			env_put("ANVIL_RESTARTED=1");
-		break;
 	case SERVICE_TYPE_CONFIG:
 		env_put(t_strconcat(MASTER_CONFIG_FILE_ENV"=",
 				    service->config_file_path, NULL));
@@ -211,8 +204,15 @@
 			services_get_config_socket_path(service->list), NULL));
 		break;
 	}
+}
+
+static void
+service_process_setup_environment(struct service *service, unsigned int uid)
+{
+	master_service_env_clean();
 
 	env_put(MASTER_IS_PARENT_ENV"=1");
+	service_rpocess_setup_config_environment(service);
 	env_put(t_strdup_printf(MASTER_CLIENT_LIMIT_ENV"=%u",
 				service->client_limit));
 	env_put(t_strdup_printf(MASTER_PROCESS_LIMIT_ENV"=%u",
@@ -232,6 +232,9 @@
 		env_put(t_strconcat(MASTER_SSL_KEY_PASSWORD_ENV"=",
 				    ssl_manual_key_password, NULL));
 	}
+	if (service->type == SERVICE_TYPE_ANVIL &&
+	    service_anvil_global->restarted)
+		env_put("ANVIL_RESTARTED=1");
 }
 
 static void service_process_status_timeout(struct service_process *process)


More information about the dovecot-cvs mailing list