dovecot-2.2: config: Fixed error reporting when reloading settin...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 10 05:24:41 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/56ef4e70b1a9
changeset: 14802:56ef4e70b1a9
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 17 15:44:36 2012 +0300
description:
config: Fixed error reporting when reloading settings for master process fails.
diffstat:
src/config/config-connection.c | 2 +-
src/lib-settings/settings-parser.c | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r d01a06d821cf -r 56ef4e70b1a9 src/config/config-connection.c
--- a/src/config/config-connection.c Tue Jul 17 15:31:03 2012 +0300
+++ b/src/config/config-connection.c Tue Jul 17 15:44:36 2012 +0300
@@ -100,7 +100,7 @@
path = master_service_get_config_path(master_service);
if (config_parse_file(path, TRUE, "", &error) <= 0) {
o_stream_send_str(conn->output,
- t_strconcat("ERROR ", error, "\n", NULL));
+ t_strconcat("\nERROR ", error, "\n", NULL));
config_connection_destroy(conn);
return -1;
}
diff -r d01a06d821cf -r 56ef4e70b1a9 src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c Tue Jul 17 15:31:03 2012 +0300
+++ b/src/lib-settings/settings-parser.c Tue Jul 17 15:44:36 2012 +0300
@@ -945,6 +945,8 @@
switch (ret) {
case -1:
+ if (ctx->error != NULL)
+ break;
if (input->stream_errno != 0) {
ctx->error = p_strdup_printf(ctx->parser_pool,
"read() failed: %m");
More information about the dovecot-cvs
mailing list