(no commit message)
[oweals/gnunet.git] / src / transport / plugin_transport_udp.c
index 5c3682e2a6445d36ed4876a4b5de0726a2ef31f9..94447bdbcffc933e7e7ed012b148d45d663511ff 100644 (file)
@@ -50,7 +50,7 @@
 #include "gnunet_signatures.h"
 #include "gnunet_statistics_service.h"
 #include "gnunet_transport_service.h"
-#include "plugin_transport.h"
+#include "gnunet_transport_plugin.h"
 #include "transport.h"
 
 #define DEBUG_UDP GNUNET_YES
@@ -723,12 +723,15 @@ run_gnunet_nat_client (struct Plugin *plugin, const char *addr, size_t addrlen)
 #endif
 
   /* Start the server process */
-  proc = GNUNET_OS_start_process(NULL, NULL, "gnunet-nat-client", "gnunet-nat-client", plugin->external_address, address_as_string, port_as_string, NULL);
+  proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-client", "gnunet-nat-client", plugin->external_address, address_as_string, port_as_string, NULL);
   GNUNET_free(address_as_string);
   GNUNET_free(port_as_string);
-  GNUNET_OS_process_wait (proc);
-  GNUNET_OS_process_close (proc);
-  proc = NULL;
+  if (proc != NULL)
+    {
+      GNUNET_OS_process_wait (proc);
+      GNUNET_OS_process_close (proc);
+      proc = NULL;
+    }
 }
 
 /**
@@ -2290,9 +2293,10 @@ libgnunet_plugin_transport_udp_init (void *cls)
 
   plugin->service = service;
 
-  GNUNET_CONFIGURATION_get_value_string(env->cfg, "transport-udp", "BINDTO", &plugin->bind_address);
-
-  GNUNET_CONFIGURATION_get_value_string(env->cfg, "transport-udp", "BINDTO6", &plugin->bind6_address);
+  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))
+    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Binding udp plugin to specific address: `%s'\n", plugin->bind6_address);
 
   if (plugin->behind_nat == GNUNET_NO)
     {