dovecot-2.0: master: Get settings without specifying module.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Mar 25 19:29:00 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/eecf62b49475
changeset: 10983:eecf62b49475
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 25 19:25:02 2010 +0200
description:
master: Get settings without specifying module.
diffstat:
src/master/main.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diffs (46 lines):
diff -r 2ed4d6da04af -r eecf62b49475 src/master/main.c
--- a/src/master/main.c Thu Mar 25 19:19:24 2010 +0200
+++ b/src/master/main.c Thu Mar 25 19:25:02 2010 +0200
@@ -395,6 +395,20 @@
master_service_stop(master_service);
}
+static struct master_settings *master_settings_read(void)
+{
+ struct master_service_settings_input input;
+ struct master_service_settings_output output;
+ const char *error;
+
+ memset(&input, 0, sizeof(input));
+ input.roots = set_roots;
+ if (master_service_settings_read(master_service, &input, &output,
+ &error) < 0)
+ i_fatal("Error reading configuration: %s", error);
+ return master_service_settings_get_others(master_service)[0];
+}
+
static void main_log_startup(void)
{
#define STARTUP_STRING PACKAGE_NAME" v"VERSION" starting up"
@@ -621,7 +635,6 @@
unsigned int child_process_env_idx = 0;
const char *error, *env_tz, *doveconf_arg = NULL;
failure_callback_t *orig_info_callback, *orig_debug_callback;
- void **sets;
bool foreground = FALSE, ask_key_pass = FALSE, log_error = FALSE;
int c, send_signal = 0;
@@ -713,12 +726,7 @@
fd_close_on_exec(null_fd, TRUE);
} while (null_fd <= STDERR_FILENO);
- if (master_service_settings_read_simple(master_service, set_roots,
- &error) < 0)
- i_fatal("Error reading configuration: %s", error);
- sets = master_service_settings_get_others(master_service);
- set = sets[0];
-
+ set = master_settings_read();
if (ask_key_pass) {
askpass("Give the password for SSL keys: ",
ssl_manual_key_password,
More information about the dovecot-cvs
mailing list