diff options
author | Günther Deschner <gdeschner@redhat.com> | 2013-06-03 17:55:07 +0200 |
---|---|---|
committer | Günther Deschner <gdeschner@redhat.com> | 2013-06-05 14:15:18 +0200 |
commit | e4ac6f8ac8b31d7e08e66c7ae50b12f520c005f9 (patch) | |
tree | 3228404aa0fc14e5b5d93748ab55f733fbd9936b | |
parent | d08d3f514fb1d61d53b0962102f96c584dcd5f65 (diff) | |
download | gss-proxy-e4ac6f8ac8b31d7e08e66c7ae50b12f520c005f9.tar.gz gss-proxy-e4ac6f8ac8b31d7e08e66c7ae50b12f520c005f9.tar.xz gss-proxy-e4ac6f8ac8b31d7e08e66c7ae50b12f520c005f9.zip |
Use verbose ding-libs error reporting when config parsing failed.
Signed-off-by: Günther Deschner <gdeschner@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r-- | proxy/src/gp_config_dinglibs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/proxy/src/gp_config_dinglibs.c b/proxy/src/gp_config_dinglibs.c index cf6c7bd..8716b91 100644 --- a/proxy/src/gp_config_dinglibs.c +++ b/proxy/src/gp_config_dinglibs.c @@ -244,7 +244,7 @@ int gp_dinglibs_init(const char *config_file, } ret = ini_config_parse(file_ctx, - INI_STOP_ON_NONE, /* error_level */ + INI_STOP_ON_ANY, /* error_level */ /* Merge section but allow duplicates */ INI_MS_MERGE | INI_MV1S_ALLOW | @@ -252,9 +252,17 @@ int gp_dinglibs_init(const char *config_file, INI_PARSE_NOWRAP, /* parse_flags */ ini_config); if (ret) { + char **errors = NULL; /* we had a parsing failure */ GPDEBUG("Failed to parse config file: %d (%s)\n", ret, strerror(ret)); + if (ini_config_error_count(ini_config)) { + ini_config_get_errors(ini_config, &errors); + if (errors) { + ini_config_print_errors(stderr, errors); + ini_config_free_errors(errors); + } + } ini_config_file_destroy(file_ctx); ini_config_destroy(ini_config); return ret; |