[GnuPG] gpgme_set_locale on global context fails ?

W. Trevor King wking at tremily.us
Fri Jul 27 22:40:42 CEST 2012


On Fri, Jul 27, 2012 at 08:53:18PM +0200, Leo Gaspard wrote:
> I'm learning GPGME, and just tried to use gpgme_set_locale. However,
> it looks like it doesn't work on the global context, only on a
> normal one.

That would be because the definition is currently:

  gpgme_error_t
  gpgme_set_locale (gpgme_ctx_t ctx, int category, const char *value)
  {
    …
    if (!ctx)
      return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));

It looks like Marcus just got into the zone with:

  commit b34add3fe438a693e236a835135bd11b4e177daa
  Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
  Date:   Thu May 26 16:01:26 2011 +0200

    Check context pointers for null pointer on entry points.

But it looks like gpgme_set_locale actually does handle the !ctx case
well.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20120727/7a0c872a/attachment.pgp>


More information about the Gnupg-devel mailing list