summaryrefslogtreecommitdiff
path: root/src/stls/stls_run.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-11-26 00:28:35 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-11-26 00:28:35 +0000
commit2b862702f3c422fc561200cf3c172fc2334dd9b4 (patch)
tree3aad264ebfe37e0233c2bf14e8d69bd3fb031945 /src/stls/stls_run.c
parentc58015ae2e8e7dfe49b8158eaffca6c11597373f (diff)
downloads6-networking-2b862702f3c422fc561200cf3c172fc2334dd9b4.tar.xz
Fix warning messages in libtls engine
Diffstat (limited to 'src/stls/stls_run.c')
-rw-r--r--src/stls/stls_run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stls/stls_run.c b/src/stls/stls_run.c
index 24ff801..125e7f2 100644
--- a/src/stls/stls_run.c
+++ b/src/stls/stls_run.c
@@ -93,7 +93,7 @@ static inline int buffer_tls_fill (struct tls *ctx, tlsbuf_t *b)
case TLS_WANT_POLLIN :
buffer_wseek(&b[1].b, w) ;
return 0 ;
- case 0 : ok = -1 ;
+ case 0 : ok = -1 ; errno = EPIPE ;
default : break ;
}
w += r ;
@@ -236,7 +236,7 @@ int stls_run (struct tls *ctx, int *fds, unsigned int verbosity, uint32 options,
r = sanitize_read(buffer_fill(&b[0].b)) ;
if (r < 0)
{
- if (r == -1) strerr_warnwu1sys("read from application") ;
+ if (errno != EPIPE) strerr_warnwu1sys("read from application") ;
fd_close(fds[0]) ; fds[0] = -1 ;
if (buffer_isempty(&b[0].b))
{
@@ -255,7 +255,7 @@ int stls_run (struct tls *ctx, int *fds, unsigned int verbosity, uint32 options,
r = buffer_tls_fill(ctx, b) ;
if (r < 0)
{
- if (errno != EPIPE) strerr_warnwu1sys("read from peer") ;
+ if (r == -1) strerr_warnwu1sys("read from peer") ;
if (options & 1) shutdown(fds[2], SHUT_RD) ;
fd_close(fds[2]) ; fds[2] = -1 ;
if (buffer_isempty(&b[1].b))