From 2b862702f3c422fc561200cf3c172fc2334dd9b4 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 26 Nov 2016 00:28:35 +0000 Subject: Fix warning messages in libtls engine --- src/stls/stls_run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/stls') 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)) -- cgit v1.2.3