gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r22199 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r22199 - gnunet/src/util
Date: Fri, 22 Jun 2012 10:23:17 +0200

Author: grothoff
Date: 2012-06-22 10:23:17 +0200 (Fri, 22 Jun 2012)
New Revision: 22199

Modified:
   gnunet/src/util/client.c
Log:
-print use shortened unixpath also when connecting...

Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2012-06-22 08:21:12 UTC (rev 22198)
+++ gnunet/src/util/client.c    2012-06-22 08:23:17 UTC (rev 22199)
@@ -267,6 +267,15 @@
       (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)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]