diff options
author | Max Kellermann <max@duempel.org> | 2009-09-24 21:40:07 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-09-24 21:40:07 +0200 |
commit | 06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8 (patch) | |
tree | ff7a44852afe108b5d7a89de1a9e8a44f7f969fe /test/run_filter.c | |
parent | f3739a73af02a0152e842f2451358aa7aa962c1e (diff) | |
download | mpd-06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8.tar.gz mpd-06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8.tar.xz mpd-06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | test/run_filter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/run_filter.c b/test/run_filter.c index 3c98491ab..ed2b904cf 100644 --- a/test/run_filter.c +++ b/test/run_filter.c @@ -90,7 +90,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; + } /* parse the audio format */ |