gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7593 - libmicrohttpd/src/daemon


From: gnunet
Subject: [GNUnet-SVN] r7593 - libmicrohttpd/src/daemon
Date: Sun, 24 Aug 2008 11:58:56 -0600 (MDT)

Author: grothoff
Date: 2008-08-24 11:58:56 -0600 (Sun, 24 Aug 2008)
New Revision: 7593

Modified:
   libmicrohttpd/src/daemon/connection_https.c
   libmicrohttpd/src/daemon/daemon.c
Log:
fix

Modified: libmicrohttpd/src/daemon/connection_https.c
===================================================================
--- libmicrohttpd/src/daemon/connection_https.c 2008-08-24 17:53:48 UTC (rev 
7592)
+++ libmicrohttpd/src/daemon/connection_https.c 2008-08-24 17:58:56 UTC (rev 
7593)
@@ -55,7 +55,7 @@
  */
 const union MHD_ConnectionInfo *
 MHD_get_connection_info (struct MHD_Connection * connection,
-                        enum MHD_InfoType infoType,
+                        enum MHD_ConnectionInfoType infoType,
                         ...)
 {
   if (connection->tls_session == NULL)
@@ -63,23 +63,24 @@
   switch (infoType)
     {
 #if HTTPS_SUPPORT
-    case MHS_INFO_CIPHER_ALGO:
-      return 
&connection->tls_session->security_parameters.read_bulk_cipher_algorithm;
-    case MHD_INFO_KX_ALGO:
-      return &connection->tls_session->security_parameters.kx_algorithm;
-    case MHD_INFO_CREDENTIALS_TYPE:
-      return &connection->tls_session->key->cred->algorithm;
-    case MHD_INFO_MAC_ALGO:
-      return &connection->tls_session->security_parameters.read_mac_algorithm;
-    case MHD_INFO_COMPRESSION_METHOD:
-      return 
&connection->tls_session->security_parameters.read_compression_algorithm;
-    case MHD_INFO_PROTOCOL:
-      return &connection->tls_session->security_parameters.version;
-    case MHD_INFO_CERT_TYPE:
-      return &connection->tls_session->security_parameters.cert_type;
+    case MHD_SESSION_INFO_CIPHER_ALGO:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.read_bulk_cipher_algorithm;
+    case MHD_SESSION_INFO_KX_ALGO:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.kx_algorithm;
+    case MHD_SESSION_INFO_CREDENTIALS_TYPE:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->key->cred->algorithm;
+    case MHD_SESSION_INFO_MAC_ALGO:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.read_mac_algorithm;
+    case MHD_SESSION_INFO_COMPRESSION_METHOD:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.read_compression_algorithm;
+    case MHD_SESSION_INFO_PROTOCOL:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.version;
+    case MHD_SESSION_INFO_CERT_TYPE:
+      return (const union MHD_ConnectionInfo*) 
&connection->tls_session->security_parameters.cert_type;
 #endif
+    default:
+      return NULL;
     };
-  return NULL;
 }
 
 /**
@@ -105,7 +106,7 @@
     connection->daemon->notify_completed (connection->daemon->
                                           notify_completed_cls, connection,
                                           &connection->client_context,
-                                          
MHD_TLS_REQUEST_TERMINATED_COMPLETED_OK);
+                                          MHD_REQUEST_TERMINATED_COMPLETED_OK);
 }
 
 /**

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2008-08-24 17:53:48 UTC (rev 7592)
+++ libmicrohttpd/src/daemon/daemon.c   2008-08-24 17:58:56 UTC (rev 7593)
@@ -822,26 +822,18 @@
 {
   const int on = 1;
   struct MHD_Daemon *retVal;
-  void * daemon_ip_addr;
-
-  /* listeningss sockets used by the daemon */
   int socket_fd;
-
   struct sockaddr_in servaddr4;
   struct sockaddr_in6 servaddr6;
-  const struct sockaddr *servaddr = 0;
+  const struct sockaddr *servaddr = NULL;
   socklen_t addrlen;
   enum MHD_OPTION opt;
 
   if ((port == 0) || (dh == NULL))
     return NULL;
-
-  /* allocate the mhd daemon */
   retVal = malloc (sizeof (struct MHD_Daemon));
   if (retVal == NULL)
     return NULL;    
-
-  /* set default daemon values */
   memset (retVal, 0, sizeof (struct MHD_Daemon));
   retVal->options = options;
   retVal->port = port;
@@ -928,7 +920,8 @@
 #endif
         default:
 #if HAVE_MESSAGES
-          if (opt > MHD_HTTPS_OPTION_START && opt < MHD_HTTPS_OPTION_END)
+          if ( (opt >= MHD_OPTION_HTTPS_KEY_PATH) && 
+              (opt <= MHD_OPTION_TLS_COMP_ALGO) )
             {
               fprintf (stderr,
                        "MHD HTTPS option %d passed to MHD compiled without 
HTTPS support\n",





reply via email to

[Prev in Thread] Current Thread [Next in Thread]