aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/uhttpd-tls.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-08-18 00:04:52 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-08-18 00:04:52 +0000
commitcbdeb30a1b82bb0d1492a86b46aad468f0a86acf (patch)
treecfc084396c1d434a0c8d41e9b638b91f55bcc7f5 /package/uhttpd/src/uhttpd-tls.c
parentaf0ecdebfdd43aa46bf624d5fa67a868e2f14857 (diff)
downloadupstream-cbdeb30a1b82bb0d1492a86b46aad468f0a86acf.tar.gz
upstream-cbdeb30a1b82bb0d1492a86b46aad468f0a86acf.tar.bz2
upstream-cbdeb30a1b82bb0d1492a86b46aad468f0a86acf.zip
uhttpd: - fix parsing of interpreter entries in the config file, fixes serving of static files as .cgi with X-Wrt - better cope with connection aborts, especially during header transfer - fix return value checking of TLS reads and writes, solves some blocking issues
SVN-Revision: 22692
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)