From 06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 24 Sep 2009 21:40:07 +0200 Subject: conf: handle fatal errors with GError Don't call g_error(), which will abort the process and dump core. This patch does not affect all the config_get_X() functions. These need some more refactoring. --- test/run_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/run_output.c') diff --git a/test/run_output.c b/test/run_output.c index 594c4cd64..5ab9625e8 100644 --- a/test/run_output.c +++ b/test/run_output.c @@ -122,7 +122,12 @@ int main(int argc, char **argv) /* read configuration file (mpd.conf) */ config_global_init(); - config_read_file(argv[1]); + success = config_read_file(argv[1], &error); + if (!success) { + g_printerr("%s:", error->message); + g_error_free(error); + return 1; + } /* initialize the audio output */ -- cgit v1.2.3