From 074f7dfe1934273a2336414c135b2494fda08af3 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 3 Jul 2011 10:13:51 +0200 Subject: Handle configuration errors better. --- lib/radsec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/radsec.c') diff --git a/lib/radsec.c b/lib/radsec.c index 6104e46..d4c0a09 100644 --- a/lib/radsec.c +++ b/lib/radsec.c @@ -64,7 +64,7 @@ rs_context_init_freeradius_dict (struct rs_context *ctx, const char *dict) char *fn = NULL; if (dict == NULL) - if (ctx->config != NULL) + if (ctx->config != NULL && ctx->config->dictionary) dict = ctx->config->dictionary; if (dict == NULL) @@ -83,7 +83,8 @@ rs_context_init_freeradius_dict (struct rs_context *ctx, const char *dict) if (dict_init (dirname (dir), basename (fn)) < 0) { - r = rs_err_ctx_push_fl (ctx, RSE_FR, __FILE__, __LINE__, "dict_init"); + r = rs_err_ctx_push_fl (ctx, RSE_FR, __FILE__, __LINE__, + "failing dict_init(\"%s\")", dict); goto out; } -- cgit v1.1