gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r13824 - gnunet/src/transport
Date: Mon, 29 Nov 2010 23:11:44 +0100

Author: grothoff
Date: 2010-11-29 23:11:44 +0100 (Mon, 29 Nov 2010)
New Revision: 13824

Modified:
   gnunet/src/transport/plugin_transport_udp.c
Log:
fixing bogus port bind by UDP

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2010-11-29 14:59:14 UTC (rev 
13823)
+++ gnunet/src/transport/plugin_transport_udp.c 2010-11-29 22:11:44 UTC (rev 
13824)
@@ -46,7 +46,6 @@
 #include "gnunet_protocols.h"
 #include "gnunet_resolver_service.h"
 #include "gnunet_server_lib.h"
-#include "gnunet_service_lib.h"
 #include "gnunet_signatures.h"
 #include "gnunet_statistics_service.h"
 #include "gnunet_transport_service.h"
@@ -355,11 +354,6 @@
    */
   struct GNUNET_TRANSPORT_PluginEnvironment *env;
 
-  /**
-   * Handle to the network service.
-   */
-  struct GNUNET_SERVICE_Context *service;
-
   /*
    * Session of peers with whom we are currently connected
    */
@@ -2152,7 +2146,6 @@
   unsigned long long port;
   struct GNUNET_TRANSPORT_PluginFunctions *api;
   struct Plugin *plugin;
-  struct GNUNET_SERVICE_Context *service;
   int sockets_created;
   int behind_nat;
   int allow_nat;
@@ -2161,15 +2154,6 @@
   char *external_address;
   struct IPv4UdpAddress v4_address;
 
-  service = GNUNET_SERVICE_start ("transport-udp", env->cfg);
-  if (service == NULL)
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _
-                       ("Failed to start service for `%s' transport 
plugin.\n"),
-                       "udp");
-      return NULL;
-    }
-
   if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
                                                          "transport-udp",
                                                          "BEHIND_NAT"))
@@ -2219,7 +2203,6 @@
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   _("Require EXTERNAL_ADDRESS for service `%s' in 
configuration (either BEHIND_NAT or ALLOW_NAT set to YES)!\n"),
                   "transport-udp");
-      GNUNET_SERVICE_stop (service);
       return NULL;
     }
 
@@ -2238,7 +2221,6 @@
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                        _("Require INTERNAL_ADDRESS for service `%s' in 
configuration!\n"),
                        "transport-udp");
-      GNUNET_SERVICE_stop (service);
       GNUNET_free_non_null(external_address);
       return NULL;
     }
@@ -2261,7 +2243,6 @@
                   "PORT",
                   port,
                   65535);
-      GNUNET_SERVICE_stop (service);
       GNUNET_free_non_null(external_address);
       GNUNET_free_non_null(internal_address);
       return NULL;
@@ -2291,8 +2272,6 @@
   api->address_to_string = &udp_address_to_string;
   api->check_address = &udp_check_address;
 
-  plugin->service = service;
-
   if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string(env->cfg, 
"transport-udp", "BINDTO", &plugin->bind_address))
     GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Binding udp plugin to specific 
address: `%s'\n", plugin->bind_address);
   if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string(env->cfg, 
"transport-udp", "BINDTO6", &plugin->bind6_address))
@@ -2348,8 +2327,6 @@
       plugin->hostname_dns = NULL;
     }
 
-  GNUNET_SERVICE_stop (plugin->service);
-
   GNUNET_NETWORK_fdset_destroy (plugin->rs);
   while (NULL != (lal = plugin->lal_head))
     {




reply via email to

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