1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 10:15:12 +03:00
aports/community/jimtcl/openssl3.patch
2022-08-02 10:35:24 +02:00

33 lines
962 B
Diff

From b0271cca8e335a1ebe4e3d6a8889bd4d7d5e30e6 Mon Sep 17 00:00:00 2001
From: Steve Bennett <steveb@workware.net.au>
Date: Tue, 5 Apr 2022 08:30:39 +1000
Subject: [PATCH] aio: ssl: Fix eof detection with openssl3
Detection of eof takes precedence over detection of error.
Fixes #207
Signed-off-by: Steve Bennett <steveb@workware.net.au>
---
jim-aio.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/jim-aio.c b/jim-aio.c
index 684a1fdf..8315c350 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -642,9 +642,12 @@ static void JimAioSetError(Jim_Interp *interp, Jim_Obj *name)
static int JimCheckStreamError(Jim_Interp *interp, AioFile *af)
{
- int ret = af->fops->error(af);
- if (ret) {
- JimAioSetError(interp, af->filename);
+ int ret = 0;
+ if (!af->fops->eof(af)) {
+ ret = af->fops->error(af);
+ if (ret) {
+ JimAioSetError(interp, af->filename);
+ }
}
return ret;
}