diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-02-13 09:53:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-02-13 09:53:44 +0000 |
commit | ae668d2eca7af0c3d31e8898e807a4398760525a (patch) | |
tree | a80af761ec87f72934eee9a89280c61b8708d602 | |
parent | 6abbeb5f407232f9742970232ca2ab9e37f62e1f (diff) | |
download | libmicrohttpd-ae668d2eca7af0c3d31e8898e807a4398760525a.tar.gz libmicrohttpd-ae668d2eca7af0c3d31e8898e807a4398760525a.zip |
fix gnutls error handling
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/daemon/daemon.c | 8 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,7 @@ | |||
1 | Sun Feb 13 10:52:29 CET 2011 | ||
2 | Handle gnutls receive error(s) for interrupted SSL | ||
3 | connections better. -MS | ||
4 | |||
1 | Fri Feb 11 10:15:38 CET 2011 | 5 | Fri Feb 11 10:15:38 CET 2011 |
2 | Fixing parameter ordering in documentation (#1659). -wellska | 6 | Fixing parameter ordering in documentation (#1659). -wellska |
3 | 7 | ||
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 3020f08e..d220973e 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -399,6 +399,14 @@ recv_tls_adapter (struct MHD_Connection *connection, void *other, size_t i) | |||
399 | errno = EINTR; | 399 | errno = EINTR; |
400 | return -1; | 400 | return -1; |
401 | } | 401 | } |
402 | if (res < 0) | ||
403 | { | ||
404 | /* Likely 'GNUTLS_E_INVALID_SESSION' (client communication | ||
405 | disrupted); set errno to something caller will interpret | ||
406 | correctly as a hard error*/ | ||
407 | errno = EPIPE; | ||
408 | return res; | ||
409 | } | ||
402 | return res; | 410 | return res; |
403 | } | 411 | } |
404 | 412 | ||