aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/uhttpd-tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/src/uhttpd-tls.c')
-rw-r--r--package/uhttpd/src/uhttpd-tls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd-tls.c b/package/uhttpd/src/uhttpd-tls.c
index 26143ddf71..008f8e0df6 100644
--- a/package/uhttpd/src/uhttpd-tls.c
+++ b/package/uhttpd/src/uhttpd-tls.c
@@ -70,12 +70,14 @@ void uh_tls_client_accept(struct client *c)
int uh_tls_client_recv(struct client *c, void *buf, int len)
{
- return SSL_read(c->tls, buf, len);
+ int rv = SSL_read(c->tls, buf, len);
+ return (rv > 0) ? rv : -1;
}
int uh_tls_client_send(struct client *c, void *buf, int len)
{
- return SSL_write(c->tls, buf, len);
+ int rv = SSL_write(c->tls, buf, len);
+ return (rv > 0) ? rv : -1;
}
void uh_tls_client_close(struct client *c)