# HG changeset patch # User Olaf Wintermann # Date 1730130479 -3600 # Node ID eee1f3092844fdb86b06b5fcdd54b24a5feb3dc4 # Parent 48f43130b4a25a72d78e568a4c14a8c67465eb18 fix missing settings_reload_repo_credentials call diff -r 48f43130b4a2 -r eee1f3092844 application/settings.c --- a/application/settings.c Mon Oct 28 15:20:58 2024 +0100 +++ b/application/settings.c Mon Oct 28 16:47:59 2024 +0100 @@ -322,7 +322,7 @@ return; } PwdStore *pwdstore = get_pwdstore(); - pwdstore = !pwdstore ? pwdstore_new() : pwdstore_clone(pwdstore); + pwdstore = pwdstore ? pwdstore_clone(pwdstore) : pwdstore_new(); UiObject *obj = ui_simple_window("Settings", NULL); ui_context_closefunc(obj->ctx, settings_close, NULL); @@ -555,7 +555,7 @@ settings_update_repolist(settings); settings_reload_keys(settings); settings_reload_credentials(settings); - void settings_reload_repo_credentials(SettingsWindow *settings); + settings_reload_repo_credentials(settings); settings->selected_repo = -1; } diff -r 48f43130b4a2 -r eee1f3092844 libidav/pwdstore.c --- a/libidav/pwdstore.c Mon Oct 28 15:20:58 2024 +0100 +++ b/libidav/pwdstore.c Mon Oct 28 16:47:59 2024 +0100 @@ -140,11 +140,7 @@ CxIterator i = cxMapIterator(p->ids); cx_foreach(CxMapEntry *, e, i) { PwdEntry *entry = e->value; - PwdEntry *new_entry = malloc(sizeof(PwdEntry)); - new_entry->id = strdup(entry->id); - new_entry->user = entry->user ? strdup(entry->user) : NULL; - new_entry->password = entry->password ? strdup(entry->password) : NULL; - cxMapPut(newp->ids, *e->key, new_entry); + pwdstore_put(newp, entry->id, entry->user, entry->password); } i = cxMapIterator(p->index); @@ -158,7 +154,7 @@ cxListAdd(locations, strdup(location)); } } - pwdstore_put_index(newp, entry->id, locations); + pwdstore_put_index(newp, strdup(entry->id), locations); } return newp;