error msg
[oweals/gnunet.git] / src / transport / gnunet-service-transport_blacklist.c
index 5053268799f1e9d2b5e78c6a0c6c4f572b6bf517..479b30eb439a9e47e705d3291c279ebb39402cb4 100644 (file)
@@ -235,9 +235,10 @@ read_blacklist_file ()
     return;
   }
   if (GNUNET_OK != GNUNET_DISK_file_test (fn))
-    GNUNET_DISK_fn_write (fn, NULL, 0,
-                          GNUNET_DISK_PERM_USER_READ |
-                          GNUNET_DISK_PERM_USER_WRITE);
+  {
+    GNUNET_free (fn);
+    return; /* no blacklist */
+  }
   if (GNUNET_OK != GNUNET_DISK_file_size (fn,
       &fsize, GNUNET_NO, GNUNET_YES))
   {
@@ -246,9 +247,9 @@ read_blacklist_file ()
     GNUNET_free (fn);
     return;
   }
-  if (fsize == 0)
+  if (0 == fsize)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Blacklist file `%s' is empty.\n"),
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Blacklist file `%s' is empty.\n",
                 fn);
     GNUNET_free (fn);
     return;
@@ -687,7 +688,8 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
               GNUNET_i2s (peer), transport_name);
   if (blacklist == NULL)
     blacklist =
-        GNUNET_CONTAINER_multihashmap_create (TRANSPORT_BLACKLIST_HT_SIZE);
+      GNUNET_CONTAINER_multihashmap_create (TRANSPORT_BLACKLIST_HT_SIZE,
+                                           GNUNET_NO);
   GNUNET_CONTAINER_multihashmap_put (blacklist, &peer->hashPubKey,
                                      GNUNET_strdup (transport_name),
                                      GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);