gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6517 - GNUnet/src/transports


From: gnunet
Subject: [GNUnet-SVN] r6517 - GNUnet/src/transports
Date: Sun, 2 Mar 2008 15:33:34 -0700 (MST)

Author: grothoff
Date: 2008-03-02 15:33:33 -0700 (Sun, 02 Mar 2008)
New Revision: 6517

Modified:
   GNUnet/src/transports/http.c
Log:
http needs v6 check as well

Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c        2008-03-02 22:30:32 UTC (rev 6516)
+++ GNUnet/src/transports/http.c        2008-03-02 22:33:33 UTC (rev 6517)
@@ -1965,21 +1965,27 @@
   if ((mhd_daemon == NULL) && (port != 0))
     {
       STEP ();
-      mhd_daemon = MHD_start_daemon (MHD_USE_IPv6,
-                                     port,
-                                     &acceptPolicyCallback,
-                                     NULL, &accessHandlerCallback, NULL,
-                                     MHD_OPTION_CONNECTION_TIMEOUT,
-                                     (unsigned int) HTTP_TIMEOUT,
-                                     MHD_OPTION_CONNECTION_MEMORY_LIMIT,
-                                     (unsigned int) 1024 * 128,
-                                     MHD_OPTION_CONNECTION_LIMIT,
-                                     (unsigned int) 128,
-                                     MHD_OPTION_PER_IP_CONNECTION_LIMIT,
-                                     (unsigned int) 8,
-                                     MHD_OPTION_NOTIFY_COMPLETED,
-                                     &requestCompletedCallback, NULL,
-                                     MHD_OPTION_END);
+      if (GNUNET_YES !=
+          GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD",
+                                                   "DISABLE-IPV6",
+                                                   GNUNET_YES))
+        {
+          mhd_daemon = MHD_start_daemon (MHD_USE_IPv6,
+                                         port,
+                                         &acceptPolicyCallback,
+                                         NULL, &accessHandlerCallback, NULL,
+                                         MHD_OPTION_CONNECTION_TIMEOUT,
+                                         (unsigned int) HTTP_TIMEOUT,
+                                         MHD_OPTION_CONNECTION_MEMORY_LIMIT,
+                                         (unsigned int) 1024 * 128,
+                                         MHD_OPTION_CONNECTION_LIMIT,
+                                         (unsigned int) 128,
+                                         MHD_OPTION_PER_IP_CONNECTION_LIMIT,
+                                         (unsigned int) 8,
+                                         MHD_OPTION_NOTIFY_COMPLETED,
+                                         &requestCompletedCallback, NULL,
+                                         MHD_OPTION_END);
+        }
       if (mhd_daemon == NULL)
         {
           /* try without IPv6 */
@@ -2009,9 +2015,13 @@
     }
   if (port == 0)
     {
-      /* assume both work for NAT */
+      /* NAT */
       available_protocols |= VERSION_AVAILABLE_IPV4;
-      available_protocols |= VERSION_AVAILABLE_IPV6;
+      if (GNUNET_YES !=
+          GNUNET_GC_get_configuration_value_yesno (cfg, "GNUNETD",
+                                                   "DISABLE-IPV6",
+                                                   GNUNET_YES))
+        available_protocols |= VERSION_AVAILABLE_IPV6;
     }
   if (0 != PIPE (signal_pipe))
     {





reply via email to

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