--- a/dav/config.c Sat Sep 07 14:08:43 2013 +0200 +++ b/dav/config.c Mon Mar 17 18:42:01 2014 +0100 @@ -62,7 +62,10 @@ return ret; } -void load_config() { +static DavContext *context; + +void load_config(DavContext *ctx) { + context = ctx; // TODO: free the config somewhere repos = ucx_map_new(16); keys = ucx_map_new(16); @@ -238,6 +241,7 @@ key->length = 32; } ucx_map_cstr_put(keys, key->name, key); + dav_context_add_key(context, key); } else { // TODO: free }