aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-09-24 21:40:07 +0200
committerMax Kellermann <max@duempel.org>2009-09-24 21:40:07 +0200
commit06d5d4b03ec446b9eb7a7351c32ef2fdca29d3c8 (patch)
treeff7a44852afe108b5d7a89de1a9e8a44f7f969fe /src/conf.h
parentf3739a73af02a0152e842f2451358aa7aa962c1e (diff)
downloadmpd-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 'src/conf.h')
-rw-r--r--src/conf.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/conf.h b/src/conf.h
index a153b7157..ef10b9f82 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -116,7 +116,8 @@ void config_global_finish(void);
*/
void config_global_check(void);
-void config_read_file(const char *file);
+bool
+config_read_file(const char *file, GError **error_r);
/* don't free the returned value
set _last_ to NULL to get first entry */
@@ -192,8 +193,8 @@ config_get_block_bool(const struct config_param *param, const char *name,
struct config_param *
config_new_param(const char *value, int line);
-void
-config_add_block_param(struct config_param *param, const char *name,
- const char *value, int line);
+bool
+config_add_block_param(struct config_param * param, const char *name,
+ const char *value, int line, GError **error_r);
#endif