]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Fixed error reporting when reloading settings for master process fails.
authorTimo Sirainen <tss@iki.fi>
Tue, 17 Jul 2012 12:44:36 +0000 (15:44 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 17 Jul 2012 12:44:36 +0000 (15:44 +0300)
src/config/config-connection.c
src/lib-settings/settings-parser.c

index bbb8c7a8c3ccbf5dcb3ee0d7707997d51e0534f9..0b5b636a06303238d03235e736b208a706712d6e 100644 (file)
@@ -100,7 +100,7 @@ static int config_connection_request(struct config_connection *conn,
                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;
                }
index 23ba31e941b3040a137a8952005fa30fc373cce0..ad11cd2a4e11191c8e8a27f63305892f361bdb0f 100644 (file)
@@ -945,6 +945,8 @@ int settings_parse_stream_read(struct setting_parser_context *ctx,
 
        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");