FIX: gpgme_key_release was not dynamically loaded
authorVolker Birk <vb@pep-project.org>
Sat, 12 Nov 2016 21:31:53 +0100
changeset 1387cc339b22d690
parent 1386 5547895c7a3f
child 1388 31bce09e2781
FIX: gpgme_key_release was not dynamically loaded
FIX: missing DYNAMIC_API on declaration of update_identity()
src/keymanagement.h
src/pgp_gpg.c
src/pgp_gpg_internal.h
     1.1 --- a/src/keymanagement.h	Sat Nov 12 00:28:28 2016 +0100
     1.2 +++ b/src/keymanagement.h	Sat Nov 12 21:31:53 2016 +0100
     1.3 @@ -22,7 +22,7 @@
     1.4  //      writing
     1.5  //      this function NEVER reads the incoming fpr, only writes to it.
     1.6  
     1.7 -PEP_STATUS update_identity(
     1.8 +DYNAMIC_API PEP_STATUS update_identity(
     1.9          PEP_SESSION session, pEp_identity * identity
    1.10      );
    1.11  
     2.1 --- a/src/pgp_gpg.c	Sat Nov 12 00:28:28 2016 +0100
     2.2 +++ b/src/pgp_gpg.c	Sat Nov 12 21:31:53 2016 +0100
     2.3 @@ -325,6 +325,10 @@
     2.4              dlsym(gpgme, "gpgme_key_unref");
     2.5          assert(gpg.gpgme_key_unref);
     2.6  
     2.7 +		gpg.gpgme_key_release = (gpgme_key_release_t)(intptr_t)
     2.8 +			dlsym(gpgme, "gpgme_key_release");
     2.9 +		assert(gpg.gpgme_key_release);
    2.10 +
    2.11          gpg.gpgme_op_edit = (gpgme_op_edit_t) (intptr_t)
    2.12              dlsym(gpgme, "gpgme_op_edit");
    2.13          assert(gpg.gpgme_op_edit);
    2.14 @@ -2148,7 +2152,7 @@
    2.15              break;
    2.16          case GPG_ERR_NO_ERROR:
    2.17              *has_private = true;
    2.18 -            gpgme_key_release(output_key);
    2.19 +            gpg.gpgme_key_release(output_key);
    2.20              break;
    2.21          case GPG_ERR_ENOMEM:
    2.22              status = PEP_OUT_OF_MEMORY;
     3.1 --- a/src/pgp_gpg_internal.h	Sat Nov 12 00:28:28 2016 +0100
     3.2 +++ b/src/pgp_gpg_internal.h	Sat Nov 12 21:31:53 2016 +0100
     3.3 @@ -70,6 +70,7 @@
     3.4      gpgme_key_t *KEYS);
     3.5  typedef void(*gpgme_key_ref_t)(gpgme_key_t KEY);
     3.6  typedef void(*gpgme_key_unref_t)(gpgme_key_t KEY);
     3.7 +typedef void(*gpgme_key_release_t)(gpgme_key_t KEY);
     3.8  typedef gpgme_error_t (*gpgme_op_edit_t)(gpgme_ctx_t CTX, gpgme_key_t KEY,
     3.9          gpgme_edit_cb_t FNC, void *HANDLE, gpgme_data_t OUT);
    3.10  typedef gpgme_ssize_t (*gpgme_io_write_t)(int fd, const void *buffer,
    3.11 @@ -117,6 +118,7 @@
    3.12      gpgme_op_import_keys_t gpgme_op_import_keys;
    3.13      gpgme_key_ref_t gpgme_key_ref;
    3.14      gpgme_key_unref_t gpgme_key_unref;
    3.15 +	gpgme_key_release_t gpgme_key_release;
    3.16      gpgme_op_edit_t gpgme_op_edit;
    3.17      gpgme_io_write_t gpgme_io_write;
    3.18  };