gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35829 - in gnunet/src: ats-tool util


From: gnunet
Subject: [GNUnet-SVN] r35829 - in gnunet/src: ats-tool util
Date: Thu, 28 May 2015 11:58:58 +0200

Author: grothoff
Date: 2015-05-28 11:58:58 +0200 (Thu, 28 May 2015)
New Revision: 35829

Modified:
   gnunet/src/ats-tool/gnunet-ats.c
   gnunet/src/util/configuration_loader.c
   gnunet/src/util/crypto_ecc_setup.c
   gnunet/src/util/crypto_hash.c
   gnunet/src/util/crypto_hash_file.c
   gnunet/src/util/disk.c
   gnunet/src/util/disk_iterator.c
Log:
-fix ftbfs

Modified: gnunet/src/ats-tool/gnunet-ats.c
===================================================================
--- gnunet/src/ats-tool/gnunet-ats.c    2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/ats-tool/gnunet-ats.c    2015-05-28 09:58:58 UTC (rev 35829)
@@ -285,11 +285,11 @@
   addresses = NULL;
 
   if (0 < pending)
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("%u address resolutions had a timeout\n"),
              pending);
   if (opt_list_used || opt_list_all)
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("ATS returned stat_results for %u addresses\n"),
              stat_results);
   ret = 0;
@@ -362,7 +362,7 @@
     return;
   }
 
-  FPRINTF (stderr,
+  FPRINTF (stdout,
            _("Peer `%s' plugin `%s', address `%s', `%s' bw out: %u Bytes/s, bw 
in %u Bytes/s, %s\n"),
            GNUNET_i2s (&pr->address->peer),
            pr->address->transport_name,
@@ -479,7 +479,7 @@
                  GNUNET_CONTAINER_multipeermap_remove (addresses,
                                                        &address->peer,
                                                        actx.res));
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("Removed address of peer `%s' with plugin `%s'\n"),
              GNUNET_i2s (&address->peer),
              actx.res->address->transport_name);
@@ -672,7 +672,7 @@
     }
     GNUNET_free(entry_in);
 
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("Quota for network `%11s' (in/out): %10s / %10s\n"),
              GNUNET_ATS_print_network_type (c),
              quota_in_str,

Modified: gnunet/src/util/configuration_loader.c
===================================================================
--- gnunet/src/util/configuration_loader.c      2015-05-28 09:43:47 UTC (rev 
35828)
+++ gnunet/src/util/configuration_loader.c      2015-05-28 09:58:58 UTC (rev 
35829)
@@ -24,6 +24,12 @@
  * @author Christian Grothoff
  */
 
+#include "platform.h"
+#include "gnunet_util_lib.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)
 /**
  * Load configuration (starts with defaults, then loads
  * system-specific configuration).
@@ -45,8 +51,10 @@
   baseconfig = NULL;
   GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d");
   GNUNET_free (ipath);
+
   if (GNUNET_SYSERR ==
-      GNUNET_DISK_directory_scan (baseconfig, &parse_configuration_file, cfg))
+      GNUNET_CONFIGURATION_load_from (cfg,
+                                      baseconfig))
   {
     GNUNET_free (baseconfig);
     return GNUNET_SYSERR;       /* no configuration at all found */

Modified: gnunet/src/util/crypto_ecc_setup.c
===================================================================
--- gnunet/src/util/crypto_ecc_setup.c  2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/util/crypto_ecc_setup.c  2015-05-28 09:58:58 UTC (rev 35829)
@@ -27,8 +27,21 @@
 #include <gcrypt.h>
 #include "gnunet_util_lib.h"
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
 
+#define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", 
syscall)
+
+#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file 
(kind, "util", syscall, filename)
+
 /**
+ * Log an error message at log-level 'level' that indicates
+ * a failure of the command 'cmd' with the message given
+ * by gcry_strerror(rc).
+ */
+#define LOG_GCRY(level, cmd, rc) do { LOG(level, _("`%s' failed at %s:%d with 
error: %s\n"), cmd, __FILE__, __LINE__, gcry_strerror(rc)); } while(0)
+
+
+/**
  * Wait for a short time (we're trying to lock a file or want
  * to give another process a shot at finishing a disk write, etc.).
  * Sleeps for 100ms (as that should be long enough for virtually all

Modified: gnunet/src/util/crypto_hash.c
===================================================================
--- gnunet/src/util/crypto_hash.c       2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/util/crypto_hash.c       2015-05-28 09:58:58 UTC (rev 35829)
@@ -18,13 +18,11 @@
      Boston, MA 02111-1307, USA.
 
 */
-
 /**
  * @file util/crypto_hash.c
  * @brief SHA-512 #GNUNET_CRYPTO_hash() related functions
  * @author Christian Grothoff
  */
-
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include <gcrypt.h>

Modified: gnunet/src/util/crypto_hash_file.c
===================================================================
--- gnunet/src/util/crypto_hash_file.c  2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/util/crypto_hash_file.c  2015-05-28 09:58:58 UTC (rev 35829)
@@ -18,14 +18,20 @@
      Boston, MA 02111-1307, USA.
 
 */
-
 /**
  * @file util/crypto_hash_file.c
  * @brief incremental hashing of files
  * @author Christian Grothoff
  */
+#include "platform.h"
+#include "gnunet_util_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)
+
+
 /**
  * Context used when hashing a file.
  */

Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c      2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/util/disk.c      2015-05-28 09:58:58 UTC (rev 35829)
@@ -17,7 +17,6 @@
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
 */
-
 /**
  * @file util/disk.c
  * @brief disk IO convenience methods
@@ -24,7 +23,6 @@
  * @author Christian Grothoff
  * @author Nils Durner
  */
-
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "disk.h"
@@ -609,7 +607,7 @@
  * with the same name).
  *
  * @param fil filename to test
- * @param is_readable GNUNET_YES to additionally check if @a fil is readable;
+ * @param is_readable #GNUNET_YES to additionally check if @a fil is readable;
  *          #GNUNET_NO to disable this check
  * @return #GNUNET_YES if yes, #GNUNET_NO if not; #GNUNET_SYSERR if it
  *           does not exist or stat'ed

Modified: gnunet/src/util/disk_iterator.c
===================================================================
--- gnunet/src/util/disk_iterator.c     2015-05-28 09:43:47 UTC (rev 35828)
+++ gnunet/src/util/disk_iterator.c     2015-05-28 09:58:58 UTC (rev 35829)
@@ -23,8 +23,17 @@
  * @author Christian Grothoff
  * @author Nils Durner
  */
+#include "platform.h"
+#include "gnunet_util_lib.h"
+#include "disk.h"
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
 
+#define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", 
syscall)
+
+#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file 
(kind, "util", syscall, filename)
+
+
 /**
  * Opaque handle used for iterating over a directory.
  */




reply via email to

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