From 8ed81720e81b20a134d9cd5c6bb50183752d9e82 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 20 Jul 2021 10:17:53 +1000 Subject: [PATCH] secur32: Set error flag on pull callback. Fixes a regression introduced in b8aaf86b2dbb8ecb3f7094cc40a0df89bb2add27 Partial revert the pull_timeout function, which now return -1 and sets the transport error to try again. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51440 Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/secur32/schannel_gnutls.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c index bcf38e3f23f..4d8109721ce 100644 --- a/dlls/secur32/schannel_gnutls.c +++ b/dlls/secur32/schannel_gnutls.c @@ -292,7 +292,15 @@ static DWORD CDECL schan_get_enabled_protocols(void) static int pull_timeout(gnutls_transport_ptr_t transport, unsigned int timeout) { - return 0; + struct schan_transport *t = (struct schan_transport*)transport; + gnutls_session_t s = (gnutls_session_t)callbacks->get_session_for_transport(t); + SIZE_T count = 0; + + TRACE("\n"); + + if (callbacks->get_buffer(t, &t->in, &count)) return 1; + pgnutls_transport_set_errno(s, EAGAIN); + return -1; } static BOOL CDECL schan_create_session(schan_session *session, schan_credentials *cred)