summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-10-07 16:48:07 +0000
committerLaurent Bercot <ska@appnovation.com>2022-10-07 16:48:07 +0000
commit748c6be0fb55d47e8a4dbfea7f3fa72ff64c904c (patch)
tree30f526671a183b3dce01f0e207ce85cede6060ab
parente8d3f9d42c34f268a181661ca4aaedfa066c0a0a (diff)
downloads6-networking-748c6be0fb55d47e8a4dbfea7f3fa72ff64c904c.tar.xz
bugfix: sbearssl_run adapted to new allread() API
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/sbearssl/sbearssl_run.c8
1 files changed, 6 insertions, 2 deletions
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))