[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs on windows and GnuTLS
From: |
Ted Zlatanov |
Subject: |
Re: Emacs on windows and GnuTLS |
Date: |
Sun, 03 Nov 2013 06:33:57 -0500 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
On Fri, 1 Nov 2013 23:13:21 +0100 Fabrice Popineau <address@hidden> wrote:
FP> I wanted to check that GnuTLS is ok on my Emacs installation
FP> and after doing:
FP> (require 'gnutls)
FP> (setq gnutls-log-level 2)
FP> (open-gnutls-stream "tls" "tls-buffer" "imap.gmail.com" "imaps")
FP> I find these annoying messages:
FP> gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable,
FP> try again.
FP> gnutls.c: [2] ASSERT: gnutls_buffers.c:1015
FP> gnutls.c: [2] ASSERT: gnutls_buffers.c:508
FP> gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable,
FP> try again.
FP> gnutls.c: [2] ASSERT: gnutls_buffers.c:1015
FP> thousands of times.
The ASERTs are coming from GnuTLS itself. You'll have to raise the
`gnutls-log-level' to 1 or 0. The non-fatal retries are probably
network-related. We don't have a way, IIRC, to tell the error's
severity in advance so we always issue it at level 1. But I have a note
in gnutls.c:
GNUTLS_LOG2 (1, max_log_level, "non-fatal error:", str);
/* TODO: EAGAIN AKA Qgnutls_e_again should be level 2. */
so specifically for GNUTLS_EAGAIN we can go up to level 3. Could you
try that change on your own? See below for suggested patch. I will
install if it works for you.
FP> I'm not sure it is even harmful.
FP> Any idea what could be wrong there ?
Not harmful, just annoying :)
Ted
=== modified file 'src/gnutls.c'
--- src/gnutls.c 2013-10-17 06:42:21 +0000
+++ src/gnutls.c 2013-11-03 11:31:16 +0000
@@ -487,9 +487,13 @@
}
else
{
+ bool eagain = (err == GNUTLS_E_AGAIN);
+ int level = eagain ? 1 : 3;
ret = 1;
- GNUTLS_LOG2 (1, max_log_level, "non-fatal error:", str);
- /* TODO: EAGAIN AKA Qgnutls_e_again should be level 2. */
+ GNUTLS_LOG2 (level,
+ max_log_level,
+ eagain ? "retry:" : "non-fatal error:",
+ str);
}
if (err == GNUTLS_E_WARNING_ALERT_RECEIVED