From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: npostavs@gmail.com, 34341@debbugs.gnu.org, l.charignon@gmail.com
Subject: bug#34341: 26.1; url-retrieve-synchronously returns blank buffer
Date: Sun, 12 May 2019 16:55:21 +0200 [thread overview]
Message-ID: <m2sgtj4t9i.fsf@gmail.com> (raw)
In-Reply-To: <83sgtjbwj3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 May 2019 17:02:56 +0300")
>>>>> On Sun, 12 May 2019 17:02:56 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> That patch to src/gnutls.c fixes my testcase, which is imap
>> over TLS1.3 to gmail. Itʼs pretty simple, I think it could go
>> to emacs-26. Eli?
Eli> Didn't I already answer that? If not, I guess you are now
Eli> talking about some patch which I didn't see, so please show
Eli> it.
From 6d5f5670443f7adfbd6993173ad997ce25827775 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 6 May 2019 19:55:17 -0400
Subject: [PATCH] Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
* src/gnutls.c (emacs_gnutls_read): Similar to emacs_gnutls_write,
when gnutls_record_recv returns GNUTLS_E_AGAIN set errno to EGAIN.
---
src/gnutls.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gnutls.c b/src/gnutls.c
index 3c16b6c9c3..b724c3592d 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -753,8 +753,15 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte)
/* The peer closed the connection. */
return 0;
else if (emacs_gnutls_handle_error (state, rtnval))
- /* non-fatal error */
- return -1;
+ {
+ /* If we get GNUTLS_E_AGAIN, then set errno appropriately so that
+ wait_reading_process_output retries the correct way instead of
+ erroring out. */
+ if (rtnval == GNUTLS_E_AGAIN)
+ errno = EAGAIN;
+ /* non-fatal error */
+ return -1;
+ }
else {
/* a fatal error occurred */
return 0;
--
2.11.0
next prev parent reply other threads:[~2019-05-12 14:55 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 4:55 bug#34341: 26.1; url-retrieve-synchronously returns blank buffer Laurent Charignon
2019-02-06 8:12 ` bug#34341: Seems fixed in latest master 5259fdf96073febd18e83785960c443bdf02a310 Laurent Charignon
2019-02-09 18:08 ` bug#34341: more observations Mikhail Rudenko
2019-05-04 15:18 ` bug#34341: 26.1; url-retrieve-synchronously returns blank buffer Noam Postavsky
2019-05-06 11:52 ` Robert Pluim
2019-05-06 12:10 ` Noam Postavsky
2019-05-06 12:15 ` Robert Pluim
2019-05-06 15:21 ` Eli Zaretskii
2019-05-07 0:16 ` Noam Postavsky
2019-05-07 2:36 ` Eli Zaretskii
2019-05-07 6:35 ` Robert Pluim
2019-05-12 13:01 ` Robert Pluim
2019-05-12 14:02 ` Eli Zaretskii
2019-05-12 14:55 ` Robert Pluim [this message]
2019-05-12 15:23 ` Eli Zaretskii
2019-05-12 15:39 ` Robert Pluim
2019-05-12 16:01 ` Eli Zaretskii
2019-05-14 0:21 ` Noam Postavsky
2019-05-14 0:34 ` Future release of emacs-26 (WAS: bug#34341) Noam Postavsky
2019-05-14 12:11 ` Nicolas Petton
2019-05-14 13:25 ` Future release of emacs-26 Stefan Monnier
2019-05-14 15:32 ` Future release of emacs-26 (WAS: bug#34341) Eli Zaretskii
2019-05-14 20:34 ` Richard Copley
2019-05-14 21:03 ` Future release of emacs-26 Stefan Monnier
2019-05-14 21:28 ` Richard Copley
2019-05-15 1:27 ` Stefan Monnier
2019-05-17 0:03 ` Stephen Leake
2019-05-17 3:03 ` Stefan Monnier
2019-05-17 6:17 ` Richard Copley
2019-05-22 16:07 ` Phillip Lord
2019-05-22 16:26 ` Stefan Monnier
2019-05-22 17:04 ` Eli Zaretskii
2019-05-23 10:09 ` Leo Liu
2019-05-27 9:05 ` Phillip Lord
2019-05-27 16:13 ` Eli Zaretskii
2019-05-27 20:17 ` Richard Stallman
2019-05-28 2:37 ` Eli Zaretskii
2019-05-28 21:41 ` Noam Postavsky
2019-06-02 18:42 ` Phillip Lord
2019-06-02 20:34 ` Stefan Monnier
2019-06-03 14:22 ` Noam Postavsky
2019-06-03 14:53 ` Eli Zaretskii
2019-06-03 15:45 ` Noam Postavsky
2019-06-03 16:00 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2sgtj4t9i.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=34341@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=l.charignon@gmail.com \
--cc=npostavs@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.