summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2014-02-10 12:49:30 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2014-02-10 12:49:30 +0000
commit2942c5b31dd4f7984c6c91bcb4b42d4daca32895 (patch)
tree9008762f56a9c9ca18bc48468101d9baf5283057 /src/transport/plugin_transport_unix.c
parentde3edfe8540884dc55e90d3ab18eae3449cba04f (diff)
- create the directory for the UNIX socket file before binding to it.
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 6c0a02e2c..ec0956c0b 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1277,6 +1277,8 @@ unix_transport_server_start (void *cls)
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
return GNUNET_SYSERR;
}
+ if ('\0' != un->sun_path[0])
+ GNUNET_DISK_directory_create_for_file (un->sun_path);
if (GNUNET_OK !=
GNUNET_NETWORK_socket_bind (plugin->unix_sock.desc, (const struct sockaddr *) un, un_len))
{