diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-26 00:28:35 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-26 00:28:35 +0000 |
commit | 2b862702f3c422fc561200cf3c172fc2334dd9b4 (patch) | |
tree | 3aad264ebfe37e0233c2bf14e8d69bd3fb031945 /src/stls | |
parent | c58015ae2e8e7dfe49b8158eaffca6c11597373f (diff) | |
download | s6-networking-2b862702f3c422fc561200cf3c172fc2334dd9b4.tar.xz |
Fix warning messages in libtls engine
Diffstat (limited to 'src/stls')
-rw-r--r-- | src/stls/stls_run.c | 6 |
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)) |