unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: Emacs on windows and GnuTLS
Date: Mon, 04 Nov 2013 11:20:34 -0500	[thread overview]
Message-ID: <87fvrcrve5.fsf@flea.lifelogs.com> (raw)
In-Reply-To: loom.20131103T180731-886@post.gmane.org

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

Thanks for the review, Fabrice.

Anticipating the need for more of these special cases, here's a
switch-based approach that avoids special variables and makes the level
explicit in each case.  It's easier to read, too.  Let me know if this
works for you and I will install it.

Ted


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnutls.eagain-lower.patch --]
[-- Type: text/x-diff, Size: 719 bytes --]

=== modified file 'src/gnutls.c'
--- src/gnutls.c	2013-11-04 06:09:03 +0000
+++ src/gnutls.c	2013-11-04 16:16:31 +0000
@@ -488,8 +488,20 @@
   else
     {
       ret = 1;
-      GNUTLS_LOG2 (1, max_log_level, "non-fatal error:", str);
-      /* TODO: EAGAIN AKA Qgnutls_e_again should be level 2.  */
+
+      switch (err)
+        {
+        case GNUTLS_E_AGAIN:
+          GNUTLS_LOG2 (3,
+                       max_log_level,
+                       "retry:",
+                       str);
+        default:
+          GNUTLS_LOG2 (1,
+                       max_log_level,
+                       "non-fatal error:",
+                       str);
+        }
     }
 
   if (err == GNUTLS_E_WARNING_ALERT_RECEIVED


  reply	other threads:[~2013-11-04 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 22:13 Emacs on windows and GnuTLS Fabrice Popineau
2013-11-03 11:33 ` Ted Zlatanov
2013-11-03 17:16   ` Fabrice Popineau
2013-11-04 16:20     ` Ted Zlatanov [this message]
2013-11-05  2:31       ` Ted Zlatanov
2013-11-05 11:59         ` Fabrice Popineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvrcrve5.fsf@flea.lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).