+ 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)) &&
+ (0 < strlen (unixpath)))
+ {
+ sock = GNUNET_CONNECTION_create_from_connect_to_unixpath (cfg,
+ unixpath);
+ GNUNET_free (unixpath);
+ if (sock != NULL)
+ return sock;
+ }
+ }
+#endif
+#if DEBUG_CLIENT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Port is 0 for service `%s', UNIXPATH did not work, returning NULL!\n",
+ service_name);
+#endif
+ GNUNET_free (hostname);
+ return NULL;
+ }
+