From d53dacb243e670df4df6d9d1dfef9b9593e655f6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 22 Jun 2012 08:23:17 +0000 Subject: [PATCH] -print use shortened unixpath also when connecting... --- src/util/client.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util/client.c b/src/util/client.c index 1f08ea25c..031945d9a 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -267,6 +267,15 @@ try_unixpath (const char *service_name, (0 < strlen (unixpath))) { /* We have a non-NULL unixpath, need to validate it */ + if (strlen (unixpath) >= sizeof (s_un.sun_path)) + { + LOG (GNUNET_ERROR_TYPE_WARNING, + _("UNIXPATH `%s' too long, maximum length is %llu\n"), unixpath, + (unsigned long long) sizeof (s_un.sun_path)); + unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); + LOG (GNUNET_ERROR_TYPE_INFO, + _("Using `%s' instead\n"), unixpath); + } connection = GNUNET_CONNECTION_create_from_connect_to_unixpath (cfg, unixpath); if (NULL != connection) { -- 2.25.1