aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-02-13 09:53:44 +0000
committerChristian Grothoff <christian@grothoff.org>2011-02-13 09:53:44 +0000
commitae668d2eca7af0c3d31e8898e807a4398760525a (patch)
treea80af761ec87f72934eee9a89280c61b8708d602
parent6abbeb5f407232f9742970232ca2ab9e37f62e1f (diff)
downloadlibmicrohttpd-ae668d2eca7af0c3d31e8898e807a4398760525a.tar.gz
libmicrohttpd-ae668d2eca7af0c3d31e8898e807a4398760525a.zip
fix gnutls error handling
-rw-r--r--ChangeLog4
-rw-r--r--src/daemon/daemon.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a33f9b8b..9db08def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
1Sun Feb 13 10:52:29 CET 2011
2 Handle gnutls receive error(s) for interrupted SSL
3 connections better. -MS
4
1Fri Feb 11 10:15:38 CET 2011 5Fri 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