Introduction
Introduction Statistics Contact Development Disclaimer Help
use tls_error for tls_read errors - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit f1683459ab74d68e6ffb9e92687aab8aa7619c32
parent 4388f861d5cc17ef801a399aa31012f5e73e6080
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 7 Jun 2020 21:22:14 +0200
use tls_error for tls_read errors
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/main.c b/main.c
@@ -764,15 +764,16 @@ main(int argc, char *argv[])
if (istls) {
retl = tls_read(tlsclientctx,
recvb+rlen, sizeof(recvb)-1-rl…
+ if (retl < 0)
+ fprintf(stderr, "tls_read fail…
} else {
retl = read(sock, recvb+rlen,
sizeof(recvb)-1-rlen);
- }
- if (retl <= 0) {
if (retl < 0)
- perror("recv");
- break;
+ perror("read");
}
+ if (retl <= 0)
+ break;
rlen += retl;
} while (recvb[rlen-1] != '\n'
&& --maxrecv > 0);
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.