[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8256 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8256 - in libmicrohttpd: . src/daemon |
Date: |
Mon, 16 Feb 2009 21:12:49 -0700 |
Author: grothoff
Date: 2009-02-16 21:12:49 -0700 (Mon, 16 Feb 2009)
New Revision: 8256
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/daemon/connection_https.c
Log:
always define connection_info
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2009-02-16 20:00:09 UTC (rev 8255)
+++ libmicrohttpd/ChangeLog 2009-02-17 04:12:49 UTC (rev 8256)
@@ -1,3 +1,7 @@
+Mon Feb 16 21:12:21 MST 2009
+ Moved MHD_get_connection_info so that it is always defined,
+ even if HTTPS support is not enabled. -CG
+
Sun Feb 8 21:15:30 MST 2009
Releasing libmicrohttpd 0.4.0. -CG
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2009-02-16 20:00:09 UTC (rev
8255)
+++ libmicrohttpd/src/daemon/connection.c 2009-02-17 04:12:49 UTC (rev
8256)
@@ -2112,4 +2112,44 @@
connection->idle_handler = &MHD_connection_handle_idle;
}
+#if HTTPS_SUPPORT
+#include "gnutls_int.h"
+#include "gnutls_record.h"
+#endif
+
+/**
+ * Obtain information about the given connection.
+ *
+ * @param connection what connection to get information about
+ * @param infoType what information is desired?
+ * @param ... depends on infoType
+ * @return NULL if this information is not available
+ * (or if the infoType is unknown)
+ */
+const union MHD_ConnectionInfo *
+MHD_get_connection_info (struct MHD_Connection *connection,
+ enum MHD_ConnectionInfoType infoType, ...)
+{
+ switch (infoType)
+ {
+#if HTTPS_SUPPORT
+ case MHD_CONNECTION_INFO_CIPHER_ALGO:
+ if (connection->tls_session == NULL)
+ return NULL;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.read_bulk_cipher_algorithm;
+ case MHD_CONNECTION_INFO_PROTOCOL:
+ if (connection->tls_session == NULL)
+ return NULL;
+ return (const union MHD_ConnectionInfo *) &connection->
+ tls_session->security_parameters.version;
+#endif
+ case MHD_CONNECTION_INFO_CLIENT_ADDRESS:
+ return (const union MHD_ConnectionInfo *) &connection->addr;
+ default:
+ return NULL;
+ };
+}
+
+
/* end of connection.c */
Modified: libmicrohttpd/src/daemon/connection_https.c
===================================================================
--- libmicrohttpd/src/daemon/connection_https.c 2009-02-16 20:00:09 UTC (rev
8255)
+++ libmicrohttpd/src/daemon/connection_https.c 2009-02-17 04:12:49 UTC (rev
8256)
@@ -40,40 +40,6 @@
#include "gnutls_errors.h"
/**
- * Obtain information about the given connection.
- *
- * @param connection what connection to get information about
- * @param infoType what information is desired?
- * @param ... depends on infoType
- * @return NULL if this information is not available
- * (or if the infoType is unknown)
- */
-const union MHD_ConnectionInfo *
-MHD_get_connection_info (struct MHD_Connection *connection,
- enum MHD_ConnectionInfoType infoType, ...)
-{
- switch (infoType)
- {
-#if HTTPS_SUPPORT
- case MHD_CONNECTION_INFO_CIPHER_ALGO:
- if (connection->tls_session == NULL)
- return NULL;
- return (const union MHD_ConnectionInfo *) &connection->
- tls_session->security_parameters.read_bulk_cipher_algorithm;
- case MHD_CONNECTION_INFO_PROTOCOL:
- if (connection->tls_session == NULL)
- return NULL;
- return (const union MHD_ConnectionInfo *) &connection->
- tls_session->security_parameters.version;
-#endif
- case MHD_CONNECTION_INFO_CLIENT_ADDRESS:
- return (const union MHD_ConnectionInfo *) &connection->addr;
- default:
- return NULL;
- };
-}
-
-/**
* This function is called once a secure connection has been marked
* for closure.
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8256 - in libmicrohttpd: . src/daemon,
gnunet <=