don't use totally empty unix path
authorNathan S. Evans <evans@in.tum.de>
Mon, 14 Feb 2011 13:39:53 +0000 (13:39 +0000)
committerNathan S. Evans <evans@in.tum.de>
Mon, 14 Feb 2011 13:39:53 +0000 (13:39 +0000)
src/util/service.c

index 767e8063d80ace932d4a5dc65793a3e050bb4d11..792a802ef8aa36794323849568e127d4fd05144a 100644 (file)
@@ -895,8 +895,13 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName,
     hostname = NULL;
 
 #ifdef AF_UNIX
-  if (GNUNET_CONFIGURATION_have_value (cfg,
-                                       serviceName, "UNIXPATH"))
+  if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value (cfg,
+                                       serviceName, "UNIXPATH")) &&
+      (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (cfg,
+                                                           serviceName,
+                                                           "UNIXPATH",
+                                                           &unixpath)) &&
+      (0 < strlen(unixpath)))
     {
       GNUNET_assert (GNUNET_OK ==
                     GNUNET_CONFIGURATION_get_value_string (cfg,