[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8340 - in libmicrohttpd: . doc src/daemon src/daemon/https
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8340 - in libmicrohttpd: . doc src/daemon src/daemon/https/tls src/testcurl/https |
Date: |
Wed, 18 Mar 2009 22:49:16 -0600 |
Author: grothoff
Date: 2009-03-18 22:49:16 -0600 (Wed, 18 Mar 2009)
New Revision: 8340
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/README
libmicrohttpd/configure.ac
libmicrohttpd/doc/Doxyfile
libmicrohttpd/src/daemon/daemon.c
libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c
libmicrohttpd/src/daemon/internal.h
libmicrohttpd/src/testcurl/https/tls_extension_test.c
Log:
release
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/ChangeLog 2009-03-19 04:49:16 UTC (rev 8340)
@@ -1,3 +1,9 @@
+Wed Mar 18 17:46:58 MDT 2009
+ Always RECV/SEND with MSG_DONTWAIT to (possibly) address
+ strange deadlock reported by Erik on the mailinglist ---
+ and/or issues with blocking read after select on GNU/Linux
+ (see select man page under bugs). -CG
+
Tue Mar 17 01:19:50 MDT 2009
Added support for thread-pools. -CG/RA
Modified: libmicrohttpd/README
===================================================================
--- libmicrohttpd/README 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/README 2009-03-19 04:49:16 UTC (rev 8340)
@@ -73,7 +73,11 @@
Missing features:
=================
-- MHD_get_daemon_info is not implemented
+- MHD_get_daemon_info is not implemented (always returns NULL)
+- SSL support does not work with SELECT-based threading modes
+ (issue is that the gnutls state machine does not like EAGAIN/EINTR
+ return values from send/recv, despite having tons of
+ branches on those values).
- SSL code is still too large:
* libgcrypt is used, and is also bloated
=> integrate required portions of libgcrypt into our tree
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/configure.ac 2009-03-19 04:49:16 UTC (rev 8340)
@@ -21,8 +21,8 @@
#
#
AC_PREREQ(2.57)
-AC_INIT([libmicrohttpd], [0.4.0a],address@hidden)
-AM_INIT_AUTOMAKE([libmicrohttpd], [0.4.0a])
+AC_INIT([libmicrohttpd], [0.4.1],address@hidden)
+AM_INIT_AUTOMAKE([libmicrohttpd], [0.4.1])
AM_CONFIG_HEADER([MHD_config.h])
AC_CONFIG_MACRO_DIR([m4])
AH_TOP([#define _GNU_SOURCE 1])
Modified: libmicrohttpd/doc/Doxyfile
===================================================================
--- libmicrohttpd/doc/Doxyfile 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/doc/Doxyfile 2009-03-19 04:49:16 UTC (rev 8340)
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "GNU libmicrohttpd"
-PROJECT_NUMBER = 0.4.0
+PROJECT_NUMBER = 0.4.1
OUTPUT_DIRECTORY = doc/doxygen/
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/src/daemon/daemon.c 2009-03-19 04:49:16 UTC (rev 8340)
@@ -522,7 +522,10 @@
{
if (connection->socket_fd == -1)
return -1;
- return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL);
+ if (0 != (connection->daemon->options & MHD_USE_SSL))
+ return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL);
+ else
+ return RECV (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT);
}
/**
@@ -539,7 +542,10 @@
{
if (connection->socket_fd == -1)
return -1;
- return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL);
+ if (0 != (connection->daemon->options & MHD_USE_SSL))
+ return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL);
+ else
+ return SEND (connection->socket_fd, other, i, MSG_NOSIGNAL | MSG_DONTWAIT);
}
/**
@@ -991,6 +997,7 @@
return ret;
}
+
/**
* Start a webserver on the given port.
*
Modified: libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c
===================================================================
--- libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c 2009-03-17 21:05:25 UTC
(rev 8339)
+++ libmicrohttpd/src/daemon/https/tls/gnutls_buffers.c 2009-03-19 04:49:16 UTC
(rev 8340)
@@ -222,7 +222,6 @@
size_t left;
ssize_t i = 0;
char *ptr = iptr;
- unsigned j, x, sum = 0;
MHD_gnutls_transport_ptr_t fd = session->internals.transport_recv_ptr;
session->internals.direction = 0;
@@ -259,31 +258,18 @@
#endif
}
else
- i = session->internals.MHD__gnutls_pull_func (fd,
- &ptr[sizeOfPtr - left],
- left);
-
+ i = session->internals.MHD__gnutls_pull_func (fd,
+ &ptr[sizeOfPtr - left],
+ left);
if (i < 0)
{
int err = session->internals.errnum ? session->internals.errnum
: errno;
-
- MHD__gnutls_read_log
- ("READ: %d returned from %d, errno=%d gerrno=%d\n", i, fd, errno,
- session->internals.errnum);
-
- if (err == EAGAIN || err == EINTR)
+ if ( (err == EAGAIN) || (err == EINTR) )
{
if (sizeOfPtr - left > 0)
- {
-
- MHD__gnutls_read_log ("READ: returning %d bytes from %d\n",
- sizeOfPtr - left, fd);
-
- goto finish;
- }
- MHD_gnutls_assert ();
-
+ goto finish;
+ MHD_gnutls_assert ();
if (err == EAGAIN)
return GNUTLS_E_AGAIN;
return GNUTLS_E_INTERRUPTED;
@@ -296,46 +282,13 @@
}
else
{
-
- MHD__gnutls_read_log ("READ: Got %d bytes from %d\n", i, fd);
-
if (i == 0)
break; /* EOF */
}
-
left -= i;
-
}
finish:
-
- if (MHD__gnutls_log_level >= 7)
- {
- char line[128];
- char tmp[16];
-
- MHD__gnutls_read_log ("READ: read %d bytes from %d\n",
- (sizeOfPtr - left), fd);
-
- for (x = 0; x < ((sizeOfPtr - left) / 16) + 1; x++)
- {
- line[0] = 0;
-
- sprintf (tmp, "%.4x - ", x);
- MHD_gtls_str_cat (line, sizeof (line), tmp);
-
- for (j = 0; j < 16; j++)
- {
- if (sum < (sizeOfPtr - left))
- {
- sprintf (tmp, "%.2x ", ((unsigned char *) ptr)[sum++]);
- MHD_gtls_str_cat (line, sizeof (line), tmp);
- }
- }
- MHD__gnutls_read_log ("%s\n", line);
- }
- }
-
return (sizeOfPtr - left);
}
@@ -368,8 +321,9 @@
if (ret > 0)
sum += ret;
}
- while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN || sum
- < RCVLOWAT);
+ while ( (ret == GNUTLS_E_INTERRUPTED) ||
+ (ret == GNUTLS_E_AGAIN) ||
+ (sum < RCVLOWAT) );
MHD_gnutls_afree (peekdata);
@@ -721,15 +675,13 @@
#endif
}
else
- i =
- session->internals.MHD__gnutls_push_func (fd, &ptr[n - left], left);
-
+ i = session->internals.MHD__gnutls_push_func (fd, &ptr[n - left], left);
if (i == -1)
{
int err = session->internals.errnum ? session->internals.errnum
: errno;
- if (err == EAGAIN || err == EINTR)
+ if ( (err == EAGAIN) || (err == EINTR) )
{
session->internals.record_send_buffer_prev_size += n - left;
@@ -742,11 +694,6 @@
MHD_gnutls_assert ();
return retval;
}
-
- MHD__gnutls_write_log
- ("WRITE: Interrupted. Stored %d bytes to buffer. Already sent
%d bytes.\n",
- left, n - left);
-
if (err == EAGAIN)
return GNUTLS_E_AGAIN;
return GNUTLS_E_INTERRUPTED;
Modified: libmicrohttpd/src/daemon/internal.h
===================================================================
--- libmicrohttpd/src/daemon/internal.h 2009-03-17 21:05:25 UTC (rev 8339)
+++ libmicrohttpd/src/daemon/internal.h 2009-03-19 04:49:16 UTC (rev 8340)
@@ -309,7 +309,7 @@
MHD_TLS_HANDSHAKE_FAILED,
- MHD_TLS_HANDSHAKE_COMPLETE,
+ MHD_TLS_HANDSHAKE_COMPLETE
};
Modified: libmicrohttpd/src/testcurl/https/tls_extension_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_extension_test.c 2009-03-17
21:05:25 UTC (rev 8339)
+++ libmicrohttpd/src/testcurl/https/tls_extension_test.c 2009-03-19
04:49:16 UTC (rev 8340)
@@ -243,6 +243,11 @@
}
i = 0;
+ setup_session (&session, &key, &cert, &xcred);
+ errorCount += test_hello_extension (session, ext_arr[i], 1, 16);
+ teardown_session (session, &key, &cert, xcred);
+#if 0
+ i = 0;
while (ext_arr[i] != -1)
{
setup_session (&session, &key, &cert, &xcred);
@@ -259,6 +264,7 @@
teardown_session (session, &key, &cert, xcred);
i++;
}
+#endif
print_test_result (errorCount, argv[0]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8340 - in libmicrohttpd: . doc src/daemon src/daemon/https/tls src/testcurl/https,
gnunet <=