gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r32251 - gnunet/src/transport
Date: Fri, 7 Feb 2014 15:21:26 +0100

Author: wachs
Date: 2014-02-07 15:21:26 +0100 (Fri, 07 Feb 2014)
New Revision: 32251

Modified:
   gnunet/src/transport/plugin_transport_unix.c
   gnunet/src/transport/transport.conf.in
Log:
unix domain sockets used hardcoded path instead of configuration setting
- removing UNIX domain sockets port support and UNIX domain socket NAT support



Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c        2014-02-07 13:16:05 UTC 
(rev 32250)
+++ gnunet/src/transport/plugin_transport_unix.c        2014-02-07 14:21:26 UTC 
(rev 32251)
@@ -50,13 +50,6 @@
  */
 #define HOSTNAME_RESOLVE_TIMEOUT GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 5)
 
-/**
- * Default "port" to use, if configuration does not specify.
- * Essentially just a number appended to the UNIX path.
- */
-#define UNIX_NAT_DEFAULT_PORT 22086
-
-
 #define LOG(kind,...) GNUNET_log_from (kind, "transport-unix",__VA_ARGS__)
 
 
@@ -316,11 +309,6 @@
    */
   int with_ws;
 
-  /**
-   * Integer to append to unix domain socket.
-   */
-  uint16_t port;
-
 };
 
 
@@ -1572,7 +1560,6 @@
 libgnunet_plugin_transport_unix_init (void *cls)
 {
   struct GNUNET_TRANSPORT_PluginEnvironment *env = cls;
-  unsigned long long port;
   struct GNUNET_TRANSPORT_PluginFunctions *api;
   struct Plugin *plugin;
   int sockets_created;
@@ -1588,16 +1575,19 @@
     api->string_to_address = &unix_string_to_address;
     return api;
   }
+
+  plugin = GNUNET_new (struct Plugin);
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_number (env->cfg, "transport-unix", 
"PORT",
-                                             &port))
-    port = UNIX_NAT_DEFAULT_PORT;
-  plugin = GNUNET_new (struct Plugin);
-  plugin->port = port;
+      GNUNET_CONFIGURATION_get_value_filename(env->cfg, "transport-unix", 
"UNIXPATH",
+                                             &plugin->unix_socket_path))
+  {
+    LOG (GNUNET_ERROR_TYPE_ERROR,
+         _("No UNIXPATH given in configuration!\n"));
+    GNUNET_free (plugin);
+    return NULL;
+  }
+
   plugin->env = env;
-  GNUNET_asprintf (&plugin->unix_socket_path,
-                  "/tmp/unix-plugin-sock.%d",
-                   plugin->port);
 
   /* Initialize my flags */
   myoptions = 0;

Modified: gnunet/src/transport/transport.conf.in
===================================================================
--- gnunet/src/transport/transport.conf.in      2014-02-07 13:16:05 UTC (rev 
32250)
+++ gnunet/src/transport/transport.conf.in      2014-02-07 14:21:26 UTC (rev 
32251)
@@ -32,7 +32,7 @@
 
 
 [transport-unix]
-PORT = 22086
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-transport-plugin-unix.sock
 TESTING_IGNORE_KEYS = ACCEPT_FROM;
 
 [transport-tcp]




reply via email to

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