From de43d00db071a04653cff592607647bb9c01d025 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 24 Aug 2011 13:24:42 -0500 Subject: Refactor signature result return format I was trying to take a shortcut and not introduce a wrapper struct for the signature results, so packed it all into alpm_sigresult_t in the first iteration. However, this is painful when one wants to add new fields or only return information regarding a single signature. Refactor the type into a few components which are exposed to the end user, and will allow a lot more future flexibility. This also exposes more information regarding the key to the frontend than was previously available. The "private" void *data pointer is used by the library to store the actual key object returned by gpgme; it is typed this way so the frontend has no expectations of what is there, and so we don't have any hard gpgme requirement in our public API. Signed-off-by: Dan McGee --- src/pacman/package.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pacman/package.c') diff --git a/src/pacman/package.c b/src/pacman/package.c index 80c6bf2f..a8c15eb8 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -149,17 +149,17 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra) alpm_pkg_get_base64_sig(pkg) ? _("Yes") : _("None")); } if(from == PKG_FROM_FILE) { - alpm_sigresult_t result; - int err = alpm_pkg_check_pgp_signature(pkg, &result); + alpm_siglist_t siglist; + int err = alpm_pkg_check_pgp_signature(pkg, &siglist); if(err && alpm_errno(config->handle) == ALPM_ERR_SIG_MISSING) { string_display(_("Signatures :"), _("None")); } else if(err) { string_display(_("Signatures :"), alpm_strerror(alpm_errno(config->handle))); } else { - signature_display(_("Signatures :"), &result); + signature_display(_("Signatures :"), &siglist); } - alpm_sigresult_cleanup(&result); + alpm_siglist_cleanup(&siglist); } string_display(_("Description :"), alpm_pkg_get_desc(pkg)); -- cgit v1.2.3-24-g4f1b