diff options
author | Simo Sorce <simo@redhat.com> | 2012-01-16 11:35:51 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-01-17 19:25:21 -0500 |
commit | 1aec40b19514481b4b155bf46a71e8bca139ccba (patch) | |
tree | 6fb26081475734db9fb976ccc7bc864322d4f3f2 /proxy/src/gp_config.c | |
parent | e4a560ed1df2fdac855f2e3f87ad24288cab9456 (diff) | |
download | gss-proxy-1aec40b19514481b4b155bf46a71e8bca139ccba.tar.gz gss-proxy-1aec40b19514481b4b155bf46a71e8bca139ccba.tar.xz gss-proxy-1aec40b19514481b4b155bf46a71e8bca139ccba.zip |
Add gssproxy_ctx
And store configuration context within it.
Diffstat (limited to 'proxy/src/gp_config.c')
-rw-r--r-- | proxy/src/gp_config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c index 4240819..552539d 100644 --- a/proxy/src/gp_config.c +++ b/proxy/src/gp_config.c @@ -73,18 +73,20 @@ struct gp_config *read_config(char *config_file, int opt_daemonize) cfg = calloc(1, sizeof(struct gp_config)); if (!cfg) { - exit(EXIT_FAILURE); + return NULL; } if (config_file) { cfg->config_file = strdup(config_file); if (!cfg->config_file) { - exit(EXIT_FAILURE); + free(cfg); + return NULL; } } else { ret = asprintf(&cfg->config_file, "%s/gssproxy.conf", PUBCONF_PATH); if (ret == -1) { - exit(EXIT_FAILURE); + free(cfg); + return NULL; } } @@ -101,7 +103,7 @@ struct gp_config *read_config(char *config_file, int opt_daemonize) ret = load_config(cfg); if (ret) { - syslog(LOG_INFO, "Config file not found"); + syslog(LOG_INFO, "Config file not found! Proceeding with defaults."); } return cfg; |