gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23478 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r23478 - gnunet/src/transport
Date: Tue, 28 Aug 2012 16:51:56 +0200

Author: wachs
Date: 2012-08-28 16:51:56 +0200 (Tue, 28 Aug 2012)
New Revision: 23478

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
Log:
changes


Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-08-28 14:51:35 UTC 
(rev 23477)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-08-28 14:51:56 UTC 
(rev 23478)
@@ -216,6 +216,11 @@
   char *ext_addr;
 
   /**
+   * Notify transport only about external address
+   */
+  unsigned int external_only;
+
+  /**
    * External address length
    */
   size_t ext_addr_len;
@@ -2400,12 +2405,26 @@
       GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                        _("Using external hostname `%s'\n"), 
plugin->external_hostname);
       plugin->notify_ext_task = GNUNET_SCHEDULER_add_now 
(&server_notify_external_hostname, plugin);
+
+      /* Use only configured external hostname */
+      if (GNUNET_CONFIGURATION_have_value
+          (plugin->env->cfg, plugin->name, "EXTERNAL_HOSTNAME_ONLY"))
+      {
+        plugin->external_only =
+            GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, 
plugin->name,
+                                                  "EXTERNAL_HOSTNAME_ONLY");
+      }
+      else
+        plugin->external_only = GNUNET_NO;
+
+      if (GNUNET_YES == plugin->external_only)
+        GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+                         _("Notifying transport only about hostname `%s'\n"), 
plugin->external_hostname);
   }
   else
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                      "No external hostname configured\n");
 
-
   /* Optional parameters */
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (plugin->env->cfg,
                       plugin->name,
@@ -2610,7 +2629,8 @@
     plugin->use_ipv6 = server_check_ipv6_support (plugin);
 
   /* Report addresses to transport service */
-  server_start_report_addresses (plugin);
+  if (GNUNET_NO == plugin->external_only)
+    server_start_report_addresses (plugin);
 
   if (GNUNET_SYSERR == server_start (plugin))
   {




reply via email to

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