diff options
author | Günther Deschner <gdeschner@redhat.com> | 2013-04-12 23:28:57 +0200 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-04-23 12:02:55 -0700 |
commit | d627d9195e043e3cb926292d87927a0a1cf03bee (patch) | |
tree | 6b921b23928278b54150f6bc5a6657a0a30e0875 /proxy/src/gp_config.h | |
parent | edf939632c9a1dbab4e769f0c23fe393d7fc8a6a (diff) | |
download | gss-proxy-d627d9195e043e3cb926292d87927a0a1cf03bee.tar.gz gss-proxy-d627d9195e043e3cb926292d87927a0a1cf03bee.tar.xz gss-proxy-d627d9195e043e3cb926292d87927a0a1cf03bee.zip |
Convert gp_config_get_* to return an error.
ENOENT is returned if no value is available.
Signed-off-by: Günther Deschner <gdeschner@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/gp_config.h')
-rw-r--r-- | proxy/src/gp_config.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/proxy/src/gp_config.h b/proxy/src/gp_config.h index 8b6341b..617f6cb 100644 --- a/proxy/src/gp_config.h +++ b/proxy/src/gp_config.h @@ -33,16 +33,19 @@ struct gp_ini_context { int gp_config_init(const char *config_file, struct gp_ini_context *ctx); -char *gp_config_get_string(struct gp_ini_context *ctx, - const char *secname, - const char *keyname); -char **gp_config_get_string_array(struct gp_ini_context *ctx, - const char *secname, - const char *keyname, - int *num_values); +int gp_config_get_string(struct gp_ini_context *ctx, + const char *secname, + const char *keyname, + char **value); +int gp_config_get_string_array(struct gp_ini_context *ctx, + const char *secname, + const char *keyname, + int *num_values, + char ***values); int gp_config_get_int(struct gp_ini_context *ctx, const char *secname, - const char *keyname); + const char *keyname, + int *value); int gp_config_get_nsec(struct gp_ini_context *ctx); char *gp_config_get_secname(struct gp_ini_context *ctx, int i); |