From ca1dcdda6cd6114061ff99963e59c76bd92e4603 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 10 Aug 2017 22:47:17 +0100 Subject: Show libotr and libgpgme versions on --version issue #956 --- src/pgp/gpg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pgp') diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 051f99f0..4654ee31 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -56,7 +56,7 @@ #define PGP_MESSAGE_HEADER "-----BEGIN PGP MESSAGE-----" #define PGP_MESSAGE_FOOTER "-----END PGP MESSAGE-----" -static const char *libversion; +static const char *libversion = NULL; static GHashTable *pubkeys; static gchar *pubsloc; @@ -420,6 +420,9 @@ p_gpg_pubkeys(void) const char* p_gpg_libver(void) { + if (libversion == NULL) { + libversion = gpgme_check_version(NULL); + } return libversion; } -- cgit 1.4.1-2-gfad0