From: Christian Grothoff Date: Fri, 22 Jun 2012 08:23:17 +0000 (+0000) Subject: -print use shortened unixpath also when connecting... X-Git-Tag: initial-import-from-subversion-38251~12887 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d53dacb243e670df4df6d9d1dfef9b9593e655f6;p=oweals%2Fgnunet.git -print use shortened unixpath also when connecting... --- 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) {