--- a/dav/config.c Wed Mar 16 14:39:59 2016 +0100 +++ b/dav/config.c Thu Mar 17 15:06:26 2016 +0100 @@ -51,7 +51,7 @@ static Proxy *http_proxy; static Proxy *https_proxy; -int check_config_dir() { +int check_config_dir(void) { char *file = util_concat_path(ENV_HOME, ".dav"); int ret = 0; if(util_mkdir(file, S_IRWXU)) { @@ -127,7 +127,7 @@ xmlFreeDoc(doc); } -void free_config() { +void free_config(void) { UcxMapIterator i = ucx_map_iterator(repos); UcxKey k; Repository *repo; @@ -154,7 +154,7 @@ ucx_map_free(keys); } -Repository* repository_new() { +Repository* repository_new(void) { Repository *repo = calloc(1, sizeof(Repository)); repo->encrypt_name = false; repo->encrypt_content = false; @@ -477,11 +477,11 @@ return ucx_map_cstr_get(keys, name); } -Proxy* get_http_proxy() { +Proxy* get_http_proxy(void) { return http_proxy; } -Proxy* get_https_proxy() { +Proxy* get_https_proxy(void) { return https_proxy; } @@ -541,3 +541,13 @@ } return 0; } + +UcxList* get_repositories(void) { + UcxList *list = NULL; + UcxMapIterator i = ucx_map_iterator(repos); + Repository *repo; + UCX_MAP_FOREACH(key, repo, i) { + list = ucx_list_append(list, repo); + } + return list; +}