diff -r 6740adb5fccd -r 017a4f09e6fa dav/main.c --- a/dav/main.c Thu Sep 20 17:14:55 2018 +0200 +++ b/dav/main.c Sun Sep 23 08:13:50 2018 +0200 @@ -455,7 +455,7 @@ return 0; } -static int cmp_url_cred_entry(PwdEntry *e1, PwdEntry *e2, void *n) { +static int cmp_url_cred_entry(PwdIndexEntry *e1, PwdIndexEntry *e2, void *n) { return strcmp(e2->location, e1->location); } @@ -471,10 +471,10 @@ */ UcxList *locations = NULL; UCX_FOREACH(elm, secrets->locations) { - PwdEntry *e = elm->data; + PwdIndexEntry *e = elm->data; char *path; Repository *r = url2repo(e->location, &path); - PwdEntry *urlentry = calloc(1, sizeof(PwdEntry)); + PwdIndexEntry *urlentry = calloc(1, sizeof(PwdEntry)); urlentry->id = strdup(e->id); urlentry->location = util_concat_path(r->url, path); locations = ucx_list_append(locations, urlentry); @@ -496,7 +496,7 @@ char *id = NULL; int ret = 0; UCX_FOREACH(elm, locations) { - PwdEntry *cred = elm->data; + PwdIndexEntry *cred = elm->data; sstr_t cred_url = sstr(cred->location); // remove protocol prefix @@ -2198,7 +2198,8 @@ char *location = assistant_getoptcfg("Location"); int ret = 1; if(user && password) { - pwdstore_put(secrets, id, location, user, password); + pwdstore_put_index(secrets, id, location); + pwdstore_put(secrets, id, user, password); int ret = pwdstore_save(secrets); if(ret) { fprintf(stderr, "Error: saving srcrets store failed.\n");