-LRN: fix socket_close logging
[oweals/gnunet.git] / src / util / crypto_hash.c
index 6438784ba521d545b487e85c0bf29e00ee348774..2ab682494118e85733d728b1a7d2475742fe934c 100644 (file)
@@ -36,6 +36,9 @@
 #include "gnunet_disk_lib.h"
 #include <gcrypt.h>
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
+#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename)
 
 /**
  * Hash block of given size.
@@ -147,7 +150,7 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     delta = fhc->fsize - fhc->offset;
   if (delta != GNUNET_DISK_file_read (fhc->fh, fhc->buffer, delta))
   {
-    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "read", fhc->filename);
+    LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "read", fhc->filename);
     file_hash_finish (fhc, NULL);
     return;
   }
@@ -340,7 +343,7 @@ GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result)
  * fast, not involve bits[0] or bits[4] (they're used elsewhere), and be
  * somewhat consistent. And of course, the result should be a positive
  * number.
- * 
+ *
  * @param a some hash code
  * @param b some hash code
  * @return a positive number which is a measure for