From 748c6be0fb55d47e8a4dbfea7f3fa72ff64c904c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 7 Oct 2022 16:48:07 +0000 Subject: bugfix: sbearssl_run adapted to new allread() API Signed-off-by: Laurent Bercot --- src/sbearssl/sbearssl_run.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sbearssl') diff --git a/src/sbearssl/sbearssl_run.c b/src/sbearssl/sbearssl_run.c index 910b70e..cff1daa 100644 --- a/src/sbearssl/sbearssl_run.c +++ b/src/sbearssl/sbearssl_run.c @@ -155,7 +155,9 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain const *tto, uint32 { size_t len ; unsigned char *s = br_ssl_engine_sendapp_buf(ctx, &len) ; - size_t w = allread(fds[0], (char *)s, len) ; + size_t w ; + errno = 0 ; + w = allread(fds[0], (char *)s, len) ; if (!w) { br_ssl_engine_flush(ctx, 0) ; @@ -194,7 +196,9 @@ void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain const *tto, uint32 { size_t len ; unsigned char *s = br_ssl_engine_recvrec_buf(ctx, &len) ; - size_t w = allread(fds[2], (char *)s, len) ; + size_t w ; + errno = 0 ; + w = allread(fds[2], (char *)s, len) ; if (!w) { if (!error_isagain(errno)) -- cgit v1.2.3