X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/120a23987a3b6152d4688200e23cc98e85b5a261..2f0ecbd629ac755177d265d05543a4fcae2962ce:/package/uhttpd/src/uhttpd-tls.c?ds=sidebyside diff --git a/package/uhttpd/src/uhttpd-tls.c b/package/uhttpd/src/uhttpd-tls.c index 26143ddf7..008f8e0df 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)