index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Olivier Brunel <jjk@jjacky.com> | 2014-06-15 19:42:40 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-06-24 13:52:15 +1000 |
commit | f1fadecfb34555cfac1c47f217253a535d64a28b (patch) | |
tree | 4221201d464af1d0ca234ef05cfd629c00a466e8 /lib/libalpm/signing.c | |
parent | d06d993d56bda499be31042bd39aaea9b8b11e3d (diff) |
-rw-r--r-- | lib/libalpm/signing.c | 12 |
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index 8fb909d9..c6b748e3 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -417,7 +417,7 @@ gpg_error: */ int _alpm_key_import(alpm_handle_t *handle, const char *fpr) { - int answer = 0, ret = -1; + int ret = -1; alpm_pgpkey_t fetch_key; memset(&fetch_key, 0, sizeof(fetch_key)); @@ -425,9 +425,13 @@ int _alpm_key_import(alpm_handle_t *handle, const char *fpr) _alpm_log(handle, ALPM_LOG_DEBUG, "unknown key, found %s on keyserver\n", fetch_key.uid); if(!_alpm_access(handle, handle->gpgdir, "pubring.gpg", W_OK)) { - QUESTION(handle, ALPM_QUESTION_IMPORT_KEY, - &fetch_key, NULL, NULL, &answer); - if(answer) { + alpm_question_import_key_t question = { + .type = ALPM_QUESTION_IMPORT_KEY, + .import = 0, + .key = &fetch_key + }; + QUESTION(handle, &question); + if(question.import) { if(key_import(handle, &fetch_key) == 0) { ret = 0; } else { |