[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 234bf1b: De-obfuscate gnutls_handshake loop
From: |
Lars Ingebrigtsen |
Subject: |
master 234bf1b: De-obfuscate gnutls_handshake loop |
Date: |
Sat, 19 Jun 2021 09:20:19 -0400 (EDT) |
branch: master
commit 234bf1b6363a3d5db8e73c422d87a0bf1aa4b2e3
Author: dickmao <none>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
De-obfuscate gnutls_handshake loop
* src/gnutls.c (gnutls_try_handshake): Rewrite the handshake loop
for greater clarity (bug#49055).
---
src/gnutls.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/gnutls.c b/src/gnutls.c
index 4d5a909..22e7f2c 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -625,16 +625,11 @@ gnutls_try_handshake (struct Lisp_Process *proc)
while ((ret = gnutls_handshake (state)) < 0)
{
- if (gnutls_error_is_fatal (ret))
- return emacs_gnutls_handle_error (state, ret);
- do
- ret = gnutls_handshake (state);
- while (ret == GNUTLS_E_INTERRUPTED);
-
- if (0 <= ret || emacs_gnutls_handle_error (state, ret) == 0
- || non_blocking)
+ if (emacs_gnutls_handle_error (state, ret) == 0) /* fatal */
break;
maybe_quit ();
+ if (non_blocking && ret != GNUTLS_E_INTERRUPTED)
+ break;
}
proc->gnutls_initstage = GNUTLS_STAGE_HANDSHAKE_TRIED;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 234bf1b: De-obfuscate gnutls_handshake loop,
Lars Ingebrigtsen <=