summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--src/util/client.c24
2 files changed, 26 insertions, 1 deletions
diff --git a/TODO b/TODO
index 9bfea3fd6..afd45f091 100644
--- a/TODO
+++ b/TODO
@@ -7,6 +7,9 @@
+ implement UDP, HTTP/HTTPS
* Transport:
- UDP fragmentation
+* UTIL / FS:
+ - gnunet-publish tires to connect to service even if
+ run with 'simulation' option (-s)
* DHT: [Nate]
- track paths content travels (PUT, reply-to-get) in messages,
pass to client (client API & protocol already support this!)
diff --git a/src/util/client.c b/src/util/client.c
index d957dd00a..ed554d96c 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -253,6 +253,7 @@ struct GNUNET_CLIENT_Connection
};
+
/**
* Try to connect to the service.
*
@@ -272,7 +273,7 @@ do_connect (const char *service_name,
unsigned long long port;
#if AF_UNIX
- if (0 == attempt % 2)
+ if (0 == (attempt % 2))
{
/* on even rounds, try UNIX */
if (GNUNET_OK ==
@@ -314,6 +315,27 @@ do_connect (const char *service_name,
service_name);
return NULL;
}
+ if (port == 0)
+ {
+#if AF_UNIX
+ if (0 != (attempt % 2))
+ {
+ /* try UNIX */
+ if (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ service_name,
+ "UNIXPATH", &unixpath))
+ {
+ sock = GNUNET_CONNECTION_create_from_connect_to_unixpath (cfg,
+ unixpath);
+ GNUNET_free (unixpath);
+ if (sock != NULL)
+ return sock;
+ }
+ }
+#endif
+ return NULL;
+ }
sock = GNUNET_CONNECTION_create_from_connect (cfg,
hostname,
port);