dav/config.c

changeset 40
a95ee94b9204
parent 38
b855f76e965b
child 43
03076907b58a
equal deleted inserted replaced
39:3e55bed345f9 40:a95ee94b9204
60 } 60 }
61 free(file); 61 free(file);
62 return ret; 62 return ret;
63 } 63 }
64 64
65 void load_config() { 65 static DavContext *context;
66
67 void load_config(DavContext *ctx) {
68 context = ctx;
66 // TODO: free the config somewhere 69 // TODO: free the config somewhere
67 repos = ucx_map_new(16); 70 repos = ucx_map_new(16);
68 keys = ucx_map_new(16); 71 keys = ucx_map_new(16);
69 http_proxy = calloc(1, sizeof(Proxy)); 72 http_proxy = calloc(1, sizeof(Proxy));
70 https_proxy = calloc(1, sizeof(Proxy)); 73 https_proxy = calloc(1, sizeof(Proxy));
236 return; 239 return;
237 } 240 }
238 key->length = 32; 241 key->length = 32;
239 } 242 }
240 ucx_map_cstr_put(keys, key->name, key); 243 ucx_map_cstr_put(keys, key->name, key);
244 dav_context_add_key(context, key);
241 } else { 245 } else {
242 // TODO: free 246 // TODO: free
243 } 247 }
244 } 248 }
245 249

mercurial