summaryrefslogtreecommitdiff
path: root/mutt-nntp/crypt-gpgme.patch
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2013-09-10 17:34:38 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2013-09-10 17:34:38 +0200
commit76fafe5e8bd99b345a7c7699447e4cc5d5382f19 (patch)
treef24b857fcafd7b4f448d7bfe33fd00c5a43500a4 /mutt-nntp/crypt-gpgme.patch
parentf55f7bd5f67e0454a6fdea0df9814794355762f5 (diff)
downloadarch-packages-76fafe5e8bd99b345a7c7699447e4cc5d5382f19.tar.gz
add mutt-nntp
Diffstat (limited to 'mutt-nntp/crypt-gpgme.patch')
-rw-r--r--mutt-nntp/crypt-gpgme.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/mutt-nntp/crypt-gpgme.patch b/mutt-nntp/crypt-gpgme.patch
new file mode 100644
index 0000000..7ed9348
--- /dev/null
+++ b/mutt-nntp/crypt-gpgme.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User Roman Kagan <rkagan@mail.ru>
+# Date 1290506473 -10800
+# Node ID 938f0706311a6ab599d29d35447f0c70972fe7cf
+# Parent 01731fb1884ea0e1eaf9008ea9c70804b66f2363
+crypt-gpgme: actually init gpgme
+
+Recent versions of gpgme (at least the one packaged with Fedora 14,
+gpgme-1.2.0), requires proper initialization of the library before use.
+
+The initialization is done via gpgme_check_version(), and gpgme_set_locale() is
+recommended right afterwards, too (see gpgme manual for details).
+
+Otherwise gpgme_init() fails with "Not operational" error, which makes mutt
+immediately quit.
+
+diff --git a/crypt-gpgme.c b/crypt-gpgme.c
+--- a/crypt-gpgme.c
++++ b/crypt-gpgme.c
+@@ -4191,6 +4191,12 @@
+ if (mutt_any_key_to_continue (NULL) == -1)
+ mutt_exit(1);
+ }
++
++ gpgme_check_version (NULL);
++ gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
++#ifdef LC_MESSAGES
++ gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
++#endif
+ }
+
+ void pgp_gpgme_init (void)