-LRN: use FPRINTF -- #2051
authorChristian Grothoff <christian@grothoff.org>
Fri, 30 Dec 2011 22:42:04 +0000 (22:42 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 30 Dec 2011 22:42:04 +0000 (22:42 +0000)
108 files changed:
src/arm/gnunet-arm.c
src/arm/test_exponential_backoff.c
src/arm/test_gnunet_service_manager.c
src/ats-test/test_transport_ats_multiple_peers.c
src/block/test_block.c
src/chat/gnunet-chat.c
src/core/gnunet-core-list-connections.c
src/core/test_core_api.c
src/core/test_core_api_reliability.c
src/core/test_core_api_start_only.c
src/core/test_core_quota_compliance.c
src/datacache/perf_datacache.c
src/datacache/test_datacache.c
src/datacache/test_datacache_quota.c
src/datastore/perf_datastore_api.c
src/datastore/perf_plugin_datastore.c
src/datastore/test_datastore_api.c
src/datastore/test_datastore_api_management.c
src/datastore/test_plugin_datastore.c
src/dht/gnunet-dht-get.c
src/dht/gnunet-dht-put.c
src/dht/test_dht_api.c
src/dht/test_dht_multipeer.c
src/dht/test_dht_twopeer.c
src/dht/test_dht_twopeer_path_tracking.c
src/dv/test_transport_api_dv.c
src/fragmentation/test_fragmentation.c
src/fs/gnunet-directory.c
src/fs/gnunet-download.c
src/fs/gnunet-fs.c
src/fs/gnunet-pseudonym.c
src/fs/gnunet-publish.c
src/fs/gnunet-search.c
src/fs/gnunet-unindex.c
src/fs/perf_gnunet_service_fs_p2p.c
src/fs/perf_gnunet_service_fs_p2p_trust.c
src/fs/test_fs_directory.c
src/fs/test_fs_download.c
src/fs/test_fs_download_indexed.c
src/fs/test_fs_download_persistence.c
src/fs/test_fs_download_recursive.c
src/fs/test_fs_file_information.c
src/fs/test_fs_getopt.c
src/fs/test_fs_list_indexed.c
src/fs/test_fs_namespace.c
src/fs/test_fs_publish.c
src/fs/test_fs_publish_persistence.c
src/fs/test_fs_search.c
src/fs/test_fs_search_persistence.c
src/fs/test_fs_search_ranking.c
src/fs/test_fs_unindex.c
src/fs/test_fs_unindex_persistence.c
src/fs/test_fs_uri.c
src/fs/test_gnunet_service_fs_migration.c
src/fs/test_gnunet_service_fs_p2p.c
src/hello/test_hello.c
src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
src/mesh/mesh_tunnel_tree.c
src/nat/gnunet-nat-server.c
src/nse/gnunet-nse-profiler.c
src/nse/test_nse_api.c
src/nse/test_nse_multipeer.c
src/peerinfo-tool/gnunet-peerinfo.c
src/peerinfo/perf_peerinfo_api.c
src/statistics/gnunet-statistics.c
src/testing/test_testing_large_topology.c
src/testing/test_testing_reconnect.c
src/testing/test_testing_topology.c
src/testing/test_testing_topology_blacklist.c
src/testing/testing_group.c
src/testing/testing_peergroup.c
src/topology/test_gnunet_daemon_topology.c
src/transport/gnunet-transport-connect-running-peers.c
src/transport/gnunet-transport.c
src/transport/test_quota_compliance.c
src/transport/test_transport_api.c
src/transport/test_transport_api_bidirectional_connect.c
src/transport/test_transport_api_disconnect.c
src/transport/test_transport_api_limited_sockets.c
src/transport/test_transport_api_reliability.c
src/transport/test_transport_api_restart_1peer.c
src/transport/test_transport_api_restart_2peers.c
src/transport/test_transport_api_timeout.c
src/transport/test_transport_api_unreliability.c
src/transport/test_transport_api_unreliability_constant.c
src/transport/test_transport_startonly.c
src/util/common_logging.c
src/util/configuration.c
src/util/crypto_random.c
src/util/getopt.c
src/util/getopt_helpers.c
src/util/plugin.c
src/util/test_common_allocation.c
src/util/test_common_logging.c
src/util/test_common_logging_dummy.c
src/util/test_common_logging_runtime_loglevels.c
src/util/test_configuration.c
src/util/test_crypto_aes_weak.c
src/util/test_crypto_ksk.c
src/util/test_crypto_random.c
src/util/test_crypto_rsa.c
src/util/test_disk.c
src/util/test_os_start_process.c
src/util/test_peer.c
src/util/test_resolver_api.c
src/util/test_scheduler_delay.c
src/util/test_service.c
src/util/test_strings.c

index 13b1fdc175f4570df5818bea94085e28a18fa75a..65700ee11c2e6cdd50fa82bbbc0a6b3e72bd0988 100644 (file)
@@ -146,47 +146,47 @@ confirm_cb (void *cls,
   switch (result)
   {
   case GNUNET_ARM_PROCESS_UNKNOWN:
-    fprintf (stderr, _("Service `%s' is unknown to ARM.\n"), service);
+    FPRINTF (stderr, _("Service `%s' is unknown to ARM.\n"), service);
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_DOWN:
     if (quiet != GNUNET_YES)
-      fprintf (stdout, _("Service `%s' has been stopped.\n"), service);
+      FPRINTF (stdout, _("Service `%s' has been stopped.\n"), service);
     break;
   case GNUNET_ARM_PROCESS_ALREADY_RUNNING:
-    fprintf (stderr, _("Service `%s' was already running.\n"), service);
+    FPRINTF (stderr, _("Service `%s' was already running.\n"), service);
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_STARTING:
     if (quiet != GNUNET_YES)
-      fprintf (stdout, _("Service `%s' has been started.\n"), service);
+      FPRINTF (stdout, _("Service `%s' has been started.\n"), service);
     break;
   case GNUNET_ARM_PROCESS_ALREADY_STOPPING:
-    fprintf (stderr, _("Service `%s' was already being stopped.\n"), service);
+    FPRINTF (stderr, _("Service `%s' was already being stopped.\n"), service);
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_ALREADY_DOWN:
-    fprintf (stderr, _("Service `%s' was already not running.\n"), service);
+    FPRINTF (stderr, _("Service `%s' was already not running.\n"), service);
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_SHUTDOWN:
-    fprintf (stderr, _("Request ignored as ARM is shutting down.\n"));
+    FPRINTF (stderr, "%s", _("Request ignored as ARM is shutting down.\n"));
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_COMMUNICATION_ERROR:
-    fprintf (stderr, _("Error communicating with ARM service.\n"));
+    FPRINTF (stderr, "%s", _("Error communicating with ARM service.\n"));
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT:
-    fprintf (stderr, _("Timeout communicating with ARM service.\n"));
+    FPRINTF (stderr, "%s",  _("Timeout communicating with ARM service.\n"));
     ret = 1;
     break;
   case GNUNET_ARM_PROCESS_FAILURE:
-    fprintf (stderr, _("Operation failed.\n"));
+    FPRINTF (stderr, "%s",  _("Operation failed.\n"));
     ret = 1;
     break;
   default:
-    fprintf (stderr, _("Unknown response code from ARM.\n"));
+    FPRINTF (stderr, "%s",  _("Unknown response code from ARM.\n"));
     break;
   }
   GNUNET_SCHEDULER_add_continuation (&cps_loop, NULL,
index 029ed145ad1fff480b92dd3b29f5921ad2b86d54..df0efb7f5da42994f84df11064c81ee17f95b36f 100644 (file)
@@ -303,15 +303,15 @@ do_nothing_restarted_notify_task (void *cls,
 #if LOG_BACKOFF
   if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
     {
-      fprintf (killLogFilePtr, "%d.Reason is shutdown!\n", trialCount);
+      FPRINTF (killLogFilePtr, "%d.Reason is shutdown!\n", trialCount);
     }
   else if ((tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0)
     {
-      fprintf (killLogFilePtr, "%d.Reason is timeout!\n", trialCount);
+      FPRINTF (killLogFilePtr, "%d.Reason is timeout!\n", trialCount);
     }
   else if ((tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE) != 0)
     {
-      fprintf (killLogFilePtr, "%d.Service is running!\n", trialCount);
+      FPRINTF (killLogFilePtr, "%d.Service is running!\n", trialCount);
     }
 #endif
   GNUNET_SCHEDULER_add_now (&kill_task, &a);
@@ -345,7 +345,7 @@ kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc)
       waitedFor = GNUNET_TIME_absolute_get_duration (startedWaitingAt);
 
 #if LOG_BACKOFF
-      fprintf (killLogFilePtr, "Waited for: %llu ms\n",
+      FPRINTF (killLogFilePtr, "Waited for: %llu ms\n",
               (unsigned long long) waitedFor.rel_value);
 #endif
     }
index 2be86e79f08f1527dbf05e2b55cbc04a0dcdc38f..dd12bbd31fb3af00a6b79af9b62da1c3a3639211 100644 (file)
@@ -161,13 +161,13 @@ main (int argc, char *argv[])
     {
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
                           "gethostname");
-      fprintf (stderr,
-              "Failed to determine my own hostname, testcase not run.\n");
+      FPRINTF (stderr,
+              "Failed to determine my own hostname, testcase not run.\n", NULL);
       return 0;
     }
   if (NULL == gethostbyname (hostname))
     {
-      fprintf (stderr,
+      FPRINTF (stderr,
               "Failed to resolve my hostname `%s', testcase not run.\n",
               hostname);
       return 0;
index e9d0baf25a8a66e86e19e1957c43b490464b3055..7425ff45dcb02a22958c47e2d08969ceff0a74ea 100644 (file)
@@ -225,7 +225,7 @@ evaluate_measurements ()
   stddev[0] /= c_new;
   stddev[0] = sqrt (stddev[0]);
   if (!machine_parsable)
-    fprintf (stderr, "new, %i measurements, average: %f stddev: %f\n", c_new,
+    FPRINTF (stderr, "new, %i measurements, average: %f stddev: %f\n", c_new,
              average[0], stddev[0]);
 
   average[1] = 0.0;
@@ -245,7 +245,7 @@ evaluate_measurements ()
   stddev[1] /= c_modified;
   stddev[1] = sqrt (stddev[1]);
   if (!machine_parsable)
-    fprintf (stderr, "modified, %i measurements, average: %f stddev: %f\n",
+    FPRINTF (stderr, "modified, %i measurements, average: %f stddev: %f\n",
              c_modified, average[1], stddev[1]);
 
   average[2] = 0.0;
@@ -265,11 +265,11 @@ evaluate_measurements ()
   stddev[2] = sqrt (stddev[2]);
 
   if (!machine_parsable)
-    fprintf (stderr, "unmodified, %i measurements, average: %f stddev: %f\n",
+    FPRINTF (stderr, "unmodified, %i measurements, average: %f stddev: %f\n",
              c_unmodified, average[2], stddev[2]);
 
   if (machine_parsable)
-    fprintf (stderr,
+    FPRINTF (stderr,
              "peers,%i,mechs,%llu," "new,%i,%f,%f," "mod,%i,%f,%f,"
              "unmod,%i,%f,%f\n", peers - 1,
              (unsigned long long) results_unmodified[0].mechs, c_new,
@@ -337,7 +337,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value,
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All %llu peers connected\n", value);
 #if !VERBOSE
     if (!machine_parsable)
-      fprintf (stderr, "%i", count);
+      FPRINTF (stderr, "%i", count);
 #endif
   }
 
@@ -395,7 +395,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value,
         }
         count++;
 #if VERBOSE
-        fprintf (stderr, "(new: %i / modified: %i / unmodified: %i) of %i \n",
+        FPRINTF (stderr, "(new: %i / modified: %i / unmodified: %i) of %i \n",
                  c_new, c_modified, c_unmodified, MEASUREMENTS);
 #endif
         if ((c_modified >= MEASUREMENTS) && (c_new >= MEASUREMENTS) &&
@@ -403,7 +403,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value,
         {
 #if !VERBOSE
           if (!machine_parsable)
-            fprintf (stdout, "\n");
+            FPRINTF (stdout, "\n");
 #endif
           if (stats_task != GNUNET_SCHEDULER_NO_TASK)
           {
@@ -418,7 +418,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value,
         current.timestamp = value;
 #if !VERBOSE
         if (!machine_parsable)
-          fprintf (stderr, "..%i", count);
+          FPRINTF (stderr, "..%i", count);
 #endif
         return GNUNET_OK;
       }
index d1d3edb96aa6a2483ddaf84b444e1c8ca5ef8378..927029ed8534bc615cde343be076103a169fa3b0 100644 (file)
@@ -72,6 +72,6 @@ main (int argc, char *argv[])
   GNUNET_BLOCK_context_destroy (ctx);
   GNUNET_CONFIGURATION_destroy (cfg);
   if (ret != 0)
-    fprintf (stderr, "Tests failed: %d\n", ret);
+    FPRINTF (stderr, "Tests failed: %d\n", ret);
   return ret;
 }
index 53884a2990d04a955fd59b26aa8a4c503232c8ee..af4eb53f3027fe113eac26ac216a397ee093a6a7 100644 (file)
@@ -89,7 +89,7 @@ do_help (const char *args, const void *xtra);
 static int
 join_cb (void *cls)
 {
-  fprintf (stdout, _("Joined\n"));
+  FPRINTF (stdout, "%s",  _("Joined\n"));
   return GNUNET_OK;
 }
 
@@ -163,7 +163,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
     break;
   }
   time = GNUNET_STRINGS_absolute_time_to_string (timestamp);
-  fprintf (stdout, fmt, time, nick, message);
+  FPRINTF (stdout, fmt, time, nick, message);
   GNUNET_free (nick);
   GNUNET_free (time);
   return GNUNET_OK;
@@ -190,7 +190,7 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
   char *nick;
 
   nick = GNUNET_PSEUDONYM_id_to_name (cfg, receiver);
-  fprintf (stdout, _("'%s' acknowledged message #%d\n"), nick, orig_seq_number);
+  FPRINTF (stdout, _("'%s' acknowledged message #%d\n"), nick, orig_seq_number);
   return GNUNET_OK;
 }
 
@@ -219,7 +219,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
                       sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                       &id);
   nick = GNUNET_PSEUDONYM_id_to_name (cfg, &id);
-  fprintf (stdout,
+  FPRINTF (stdout,
            member_info !=
            NULL ? _("`%s' entered the room\n") : _("`%s' left the room\n"),
            nick);
@@ -281,11 +281,11 @@ do_join (const char *arg, const void *xtra)
                              &confirmation_cb, NULL, &me);
   if (NULL == room)
   {
-    fprintf (stdout, _("Could not change username\n"));
+    FPRINTF (stdout, "%s",  _("Could not change username\n"));
     return GNUNET_SYSERR;
   }
   my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me);
-  fprintf (stdout, _("Joining room `%s' as user `%s'...\n"), room_name,
+  FPRINTF (stdout, _("Joining room `%s' as user `%s'...\n"), room_name,
            my_name);
   GNUNET_free (my_name);
   return GNUNET_OK;
@@ -313,11 +313,11 @@ do_nick (const char *msg, const void *xtra)
                              &confirmation_cb, NULL, &me);
   if (NULL == room)
   {
-    fprintf (stdout, _("Could not change username\n"));
+    FPRINTF (stdout, "%s",  _("Could not change username\n"));
     return GNUNET_SYSERR;
   }
   my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me);
-  fprintf (stdout, _("Changed username to `%s'\n"), my_name);
+  FPRINTF (stdout, _("Changed username to `%s'\n"), my_name);
   GNUNET_free (my_name);
   return GNUNET_OK;
 }
@@ -330,7 +330,7 @@ do_names (const char *msg, const void *xtra)
   struct UserList *pos;
   GNUNET_HashCode pid;
 
-  fprintf (stdout, _("Users in room `%s': "), room_name);
+  FPRINTF (stdout, _("Users in room `%s': "), room_name);
   pos = users;
   while (NULL != pos)
   {
@@ -338,11 +338,11 @@ do_names (const char *msg, const void *xtra)
                         sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                         &pid);
     name = GNUNET_PSEUDONYM_id_to_name (cfg, &pid);
-    fprintf (stdout, "`%s' ", name);
+    FPRINTF (stdout, "`%s' ", name);
     GNUNET_free (name);
     pos = pos->next;
   }
-  fprintf (stdout, "\n");
+  FPRINTF (stdout, "%s",  "\n");
   return GNUNET_OK;
 }
 
@@ -368,7 +368,7 @@ do_send_pm (const char *msg, const void *xtra)
 
   if (NULL == strstr (msg, " "))
   {
-    fprintf (stderr, _("Syntax: /msg USERNAME MESSAGE"));
+    FPRINTF (stderr, "%s",  _("Syntax: /msg USERNAME MESSAGE"));
     return GNUNET_OK;
   }
   user = GNUNET_strdup (msg);
@@ -376,7 +376,7 @@ do_send_pm (const char *msg, const void *xtra)
   msg += strlen (user) + 1;
   if (GNUNET_OK != GNUNET_PSEUDONYM_name_to_id (cfg, user, &uid))
   {
-    fprintf (stderr, _("Unknown user `%s'\n"), user);
+    FPRINTF (stderr, _("Unknown user `%s'\n"), user);
     GNUNET_free (user);
     return GNUNET_OK;
   }
@@ -392,7 +392,7 @@ do_send_pm (const char *msg, const void *xtra)
   }
   if (NULL == pos)
   {
-    fprintf (stderr, _("User `%s' is currently not in the room!\n"), user);
+    FPRINTF (stderr, _("User `%s' is currently not in the room!\n"), user);
     GNUNET_free (user);
     return GNUNET_OK;
   }
@@ -445,7 +445,7 @@ do_quit (const char *args, const void *xtra)
 static int
 do_unknown (const char *msg, const void *xtra)
 {
-  fprintf (stderr, _("Unknown command `%s'\n"), msg);
+  FPRINTF (stderr, _("Unknown command `%s'\n"), msg);
   return GNUNET_OK;
 }
 
@@ -510,20 +510,20 @@ do_help (const char *args, const void *xtra)
   {
     if (0 == strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1))
     {
-      fprintf (stdout, "%s\n", gettext (commands[i].helptext));
+      FPRINTF (stdout, "%s\n", gettext (commands[i].helptext));
       return GNUNET_OK;
     }
     i++;
   }
   i = 0;
-  fprintf (stdout, "Available commands:");
+  FPRINTF (stdout, "%s",  "Available commands:");
   while (commands[i].Action != &do_help)
   {
-    fprintf (stdout, " %s", gettext (commands[i].command));
+    FPRINTF (stdout, " %s", gettext (commands[i].command));
     i++;
   }
-  fprintf (stdout, "\n");
-  fprintf (stdout, "%s\n", gettext (commands[i].helptext));
+  FPRINTF (stdout, "%s",  "\n");
+  FPRINTF (stdout, "%s\n", gettext (commands[i].helptext));
   return GNUNET_OK;
 }
 
@@ -602,7 +602,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   /* check arguments */
   if (NULL == nickname)
   {
-    fprintf (stderr, _("You must specify a nickname\n"));
+    FPRINTF (stderr, "%s",  _("You must specify a nickname\n"));
     ret = -1;
     return;
   }
@@ -618,7 +618,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                              &confirmation_cb, NULL, &me);
   if (NULL == room)
   {
-    fprintf (stderr, _("Failed to join room `%s'\n"), room_name);
+    FPRINTF (stderr, _("Failed to join room `%s'\n"), room_name);
     GNUNET_free (room_name);
     GNUNET_free (nickname);
     GNUNET_CONTAINER_meta_data_destroy (meta);
@@ -626,7 +626,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     return;
   }
   my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me);
-  fprintf (stdout, _("Joining room `%s' as user `%s'...\n"), room_name,
+  FPRINTF (stdout, _("Joining room `%s' as user `%s'...\n"), room_name,
            my_name);
   GNUNET_free (my_name);
   handle_cmd_task =
index c93f5098127630c98f31bfb67ada75ec266c806c..fcd0765649809461fd91f0759d226aaccc45df6f 100644 (file)
@@ -115,7 +115,7 @@ process_resolved_address (void *cls, const struct GNUNET_PeerIdentity *peer,
   /*
    * new_address = GNUNET_malloc (sizeof (struct AddressStringList));
    * #if VERBOSE
-   * fprintf (stderr, "Received address %s\n", address);
+   * FPRINTF (stderr, "Received address %s\n", address);
    * #endif
    *
    * new_address->address_string = GNUNET_strdup ("FIXME");
@@ -138,7 +138,7 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (peer != NULL)             /* Not yet finished */
   {
 #if VERBOSE
-    fprintf (stderr, "Learned about peer %s\n", GNUNET_i2s (peer));
+    FPRINTF (stderr, "Learned about peer %s\n", GNUNET_i2s (peer));
     peer_count++;
 #endif
     pc = GNUNET_malloc (sizeof (struct PrintContext));
@@ -150,7 +150,7 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
 #if VERBOSE
   else
   {
-    fprintf (stderr, "Counted %u total connected peers.\n", peer_count);
+    FPRINTF (stderr, "Counted %u total connected peers.\n", peer_count);
   }
 #endif
 }
@@ -172,7 +172,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   cfg = c;
   if (args[0] != NULL)
   {
-    fprintf (stderr, _("Invalid command line argument `%s'\n"), args[0]);
+    FPRINTF (stderr, _("Invalid command line argument `%s'\n"), args[0]);
     return;
   }
 
index e63fc9f9da0526d9c7195520ba5514e91a859dab..df29d52a1be56ab5d489a7b7b524d496c667531c 100644 (file)
@@ -112,7 +112,7 @@ static void
 terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 #if VERBOSE
-  fprintf (stderr, "ENDING ANGRILY %u\n", ok);
+  FPRINTF (stderr, "ENDING ANGRILY %u\n", ok);
 #endif
   GNUNET_break (0);
   if (NULL != p1.ch)
index b2079ba35300421dbb788378c7e6404786443f99..434886d42ad499882b2b29724dfd9e2d19dc21ec 100644 (file)
@@ -134,7 +134,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_TRANSPORT_disconnect (p2.th);
   p2.th = NULL;
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  fprintf (stderr, "\nThroughput was %llu kb/s\n",
+  FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
            total_bytes * 1000 / 1024 / delta);
   GAUGER ("CORE", "Core throughput/s", total_bytes * 1000 / 1024 / delta,
           "kb/s");
@@ -353,7 +353,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
 #endif
   n++;
   if (0 == (n % (TOTAL_MSGS / 100)))
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
   if (n == TOTAL_MSGS)
   {
     GNUNET_SCHEDULER_cancel (err_task);
index b06b978991771077c7e2a818d75008125faa55e6..75ba73ce357a7e8a42ca2a3a9b17add88d6b3bcc 100644 (file)
@@ -58,7 +58,7 @@ static GNUNET_SCHEDULER_TaskIdentifier timeout_task_id;
 static int ok;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -162,7 +162,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
 static void
 timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  fprintf (stderr, "Timeout.\n");
+  FPRINTF (stderr, "%s",  "Timeout.\n");
   if (p1.ch != NULL)
   {
     GNUNET_CORE_disconnect (p1.ch);
index adfa93f1fc2602ba2a325e786f800179e2e3caa0..c45863f0d41a859b1c4efa5f22bbc1f64072fc7a 100644 (file)
@@ -227,7 +227,7 @@ measurement_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   enum GNUNET_ErrorType kind = GNUNET_ERROR_TYPE_DEBUG;
 
   measure_task = GNUNET_SCHEDULER_NO_TASK;
-  fprintf (stdout, "\n");
+  FPRINTF (stdout, "%s",  "\n");
   running = GNUNET_NO;
 
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
@@ -498,7 +498,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
 #endif
   n++;
   if (0 == (n % 10))
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
 
 
   if (running == GNUNET_YES)
index 6fc0a7217a95331a29f31003e09519a597748040..0f4fea4197721bb0f9106dbb0d7546c50312f317 100644 (file)
@@ -71,8 +71,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if (h == NULL)
   {
-    fprintf (stderr,
-             "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
+    FPRINTF (stderr, "%s", "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
     return;
   }
   exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
@@ -81,15 +80,15 @@ run (void *cls, char *const *args, const char *cfgfile,
   for (i = 0; i < ITERATIONS; i++)
   {
     if (0 == i % (ITERATIONS / 80))
-      fprintf (stderr, ".");
+      FPRINTF (stderr, "%s",  ".");
     GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
     ASSERT (GNUNET_OK ==
             GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode),
                                   (const char *) &n, 1 + i % 16, exp));
     k = n;
   }
-  fprintf (stderr, "\n");
-  fprintf (stdout, "Stored %u items in %llums\n", ITERATIONS,
+  FPRINTF (stderr, "%s",  "\n");
+  FPRINTF (stdout, "Stored %u items in %llums\n", ITERATIONS,
            (unsigned long long)
            GNUNET_TIME_absolute_get_duration (start).rel_value);
   GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
@@ -101,13 +100,13 @@ run (void *cls, char *const *args, const char *cfgfile,
   for (i = 0; i < ITERATIONS; i++)
   {
     if (0 == i % (ITERATIONS / 80))
-      fprintf (stderr, ".");
+      FPRINTF (stderr, "%s",  ".");
     GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
     GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n);
     k = n;
   }
-  fprintf (stderr, "\n");
-  fprintf (stdout,
+  FPRINTF (stderr, "%s",  "\n");
+  FPRINTF (stdout,
            "Found %u/%u items in %llums (%u were deleted during storage processing)\n",
            found, ITERATIONS,
            (unsigned long long)
@@ -169,7 +168,7 @@ main (int argc, char *argv[])
   GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
                       "perf-datacache", "nohelp", options, &run, NULL);
   if (ok != 0)
-    fprintf (stderr, "Missed some perfcases: %d\n", ok);
+    FPRINTF (stderr, "Missed some perfcases: %d\n", ok);
   return ok;
 }
 
index 6c70807c104c86994712a05b6223a26698390655..ff3640b6fb9d3cf046b95e55a4e12627e3cb76d4 100644 (file)
@@ -71,8 +71,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   h = GNUNET_DATACACHE_create (cfg, "testcache");
   if (h == NULL)
   {
-    fprintf (stderr,
-             "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
+    FPRINTF (stderr,
+             "Failed to initialize datacache.  Database likely not setup, skipping test.\n", NULL);
     return;
   }
   exp = GNUNET_TIME_absolute_get ();
@@ -154,7 +154,7 @@ main (int argc, char *argv[])
   GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
                       "test-datacache", "nohelp", options, &run, NULL);
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %d\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %d\n", ok);
   return ok;
 }
 
index d3681da8e805e2ba446dbff0e549a54e996599af..468972c9ec9fa840ddba422a553934133264fc49 100644 (file)
@@ -60,8 +60,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if (h == NULL)
   {
-    fprintf (stderr,
-             "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
+    FPRINTF (stderr, "%s", "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
     return;
   }
   exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
@@ -69,7 +68,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   memset (&k, 0, sizeof (GNUNET_HashCode));
   for (i = 0; i < 10; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
     for (j = i; j < sizeof (buf); j += 10)
     {
@@ -80,11 +79,11 @@ run (void *cls, char *const *args, const char *cfgfile,
     }
     k = n;
   }
-  fprintf (stderr, "\n");
+  FPRINTF (stderr, "%s",  "\n");
   memset (&k, 0, sizeof (GNUNET_HashCode));
   for (i = 0; i < 10; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
     if (i < 2)
       ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
@@ -92,7 +91,7 @@ run (void *cls, char *const *args, const char *cfgfile,
       ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
     k = n;
   }
-  fprintf (stderr, "\n");
+  FPRINTF (stderr, "%s",  "\n");
   GNUNET_DATACACHE_destroy (h);
   return;
 FAILURE:
@@ -145,7 +144,7 @@ main (int argc, char *argv[])
   GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
                       "test-datacache-quota", "nohelp", options, &run, NULL);
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %d\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %d\n", ok);
   return ok;
 }
 
index 372a61f7da0f04a8884bc1589ddc4de1ddb1cde8..106d406840f6813c300e8e86d758cd4344e154bf 100644 (file)
@@ -123,7 +123,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio
     return;
   }
 #if REPORT_ID
-  fprintf (stderr, "I");
+  FPRINTF (stderr, "%s",  "I");
 #endif
   stored_bytes += crc->size;
   stored_ops++;
@@ -166,7 +166,7 @@ remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration,
     return;
   }
 #if REPORT_ID
-  fprintf (stderr, "D");
+  FPRINTF (stderr, "%s",  "D");
 #endif
   GNUNET_assert (GNUNET_OK == success);
   GNUNET_SCHEDULER_add_now (&run_continuation, crc);
@@ -284,7 +284,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
 
   if (success != GNUNET_YES)
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Test 'put' operation failed with error `%s' database likely not setup, skipping test.",
              msg);
     GNUNET_free (crc);
@@ -314,7 +314,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                             (GNUNET_TIME_UNIT_SECONDS), 0, 1,
                             GNUNET_TIME_UNIT_MINUTES, &run_tests, crc))
   {
-    fprintf (stderr, "Test 'put' operation failed.\n");
+    FPRINTF (stderr, "%s",  "Test 'put' operation failed.\n");
     ok = 1;
     GNUNET_free (crc);
   }
@@ -396,7 +396,7 @@ main (int argc, char *argv[])
   if (pos != plugin_name)
     pos[0] = '.';
 #if REPORT_ID
-  fprintf (stderr, "\n");
+  FPRINTF (stderr, "%s",  "\n");
 #endif
   GNUNET_DISK_directory_remove (dir_name);
   return ret;
index 8f552c4ebebf8102a223e442401bdfe3f50e6f1a..6106b11cbcfedfe59c5737412cc41a8b7d229150 100644 (file)
@@ -135,7 +135,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
                                GNUNET_CRYPTO_random_u32
                                (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg))
   {
-    fprintf (stderr, "ERROR: `%s'\n", msg);
+    FPRINTF (stderr, "ERROR: `%s'\n", msg);
     GNUNET_free_non_null (msg);
     return;
   }
@@ -165,7 +165,7 @@ iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size,
   hits[i / 8] |= (1 << (i % 8));
 
 #if VERBOSE
-  fprintf (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n",
+  FPRINTF (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n",
            type, priority, size, (unsigned long long) expiration.abs_value);
 #endif
   crc->cnt++;
@@ -344,7 +344,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     crc->phase = RP_ERROR;
   }
 #if VERBOSE
-  fprintf (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt);
+  FPRINTF (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt);
 #endif
   switch (crc->phase)
   {
@@ -422,7 +422,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
   GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name);
   if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env)))
   {
-    fprintf (stderr, "Failed to load plugin `%s'!\n", name);
+    FPRINTF (stderr, "Failed to load plugin `%s'!\n", name);
     return NULL;
   }
   GNUNET_free (libname);
@@ -441,8 +441,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   api = load_plugin (c);
   if (api == NULL)
   {
-    fprintf (stderr,
-             "Could not initialize plugin, assuming database not configured. Test not run!\n");
+    FPRINTF (stderr,
+             "Could not initialize plugin, assuming database not configured. Test not run!\n", NULL);
     return;
   }
   crc = GNUNET_malloc (sizeof (struct CpsRunContext));
@@ -478,7 +478,7 @@ check ()
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
                       "perf-plugin-datastore", "nohelp", options, &run, NULL);
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %u\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %u\n", ok);
   return ok;
 }
 
index 942e0a11ef9e9fe44209f7d2d95a908684d61c05..df6d3af624d4ff008a73e564629ac979c7595a97 100644 (file)
@@ -193,10 +193,10 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
     return;
   }
 #if 0
-  fprintf (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n",
+  FPRINTF (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n",
            GNUNET_h2s (key), (unsigned int) size, type,
            (unsigned long long) expiration.abs_value);
-  fprintf (stderr,
+  FPRINTF (stderr,
            "Check value iteration %d wants size %u, type %d, expire %llu\n", i,
            (unsigned int) get_size (i), get_type (i),
            (unsigned long long) get_expiration (i).abs_value);
@@ -461,11 +461,11 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     return;
   case GNUNET_NO:
-    fprintf (stderr, "Test 'put' operation failed, key already exists (!?)\n");
+    FPRINTF (stderr, "%s", "Test 'put' operation failed, key already exists (!?)\n");
     GNUNET_free (crc);
     return;
   case GNUNET_SYSERR:
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n",
              msg);
     GNUNET_free (crc);
@@ -495,7 +495,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                             (GNUNET_TIME_UNIT_SECONDS), 0, 1,
                             GNUNET_TIME_UNIT_MINUTES, &run_tests, crc))
   {
-    fprintf (stderr, "Test 'put' operation failed.\n");
+    FPRINTF (stderr, "%s",  "Test 'put' operation failed.\n");
     ok = 1;
     GNUNET_free (crc);
   }
@@ -548,7 +548,7 @@ check ()
   proc = NULL;
 #endif
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %u\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %u\n", ok);
   return ok;
 }
 
index 3cb8ed94a4f4e6ba5d95f84356b8f8a484aeac00..20a405d072c14fc02dd2ad7da65dddce47785ff9 100644 (file)
@@ -252,7 +252,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
 
   if (success != GNUNET_YES)
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Test 'put' operation failed with error `%s' database likely not setup, skipping test.",
              msg);
     GNUNET_free (crc);
@@ -282,7 +282,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                             (GNUNET_TIME_UNIT_SECONDS), 0, 1,
                             GNUNET_TIME_UNIT_MINUTES, &run_tests, crc))
   {
-    fprintf (stderr, "Test 'put' operation failed.\n");
+    FPRINTF (stderr, "%s",  "Test 'put' operation failed.\n");
     GNUNET_free (crc);
     ok = 1;
   }
@@ -331,7 +331,7 @@ check ()
   GNUNET_OS_process_close (proc);
   proc = NULL;
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %u\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %u\n", ok);
   return ok;
 }
 
index 3504945aec29c79b75d15051792291ae620dfd25..ca894ff33d178eb46a29e3f752a7fd75d11b63a8 100644 (file)
@@ -118,7 +118,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
   msg = NULL;
   prio = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100);
 #if VERBOSE
-  fprintf (stderr, "putting type %u, anon %u under key %s\n", i + 1, i,
+  FPRINTF (stderr, "putting type %u, anon %u under key %s\n", i + 1, i,
            GNUNET_h2s (&key));
 #endif
   if (GNUNET_OK != api->put (api->cls, &key, size, value, i + 1 /* type */ ,
@@ -131,7 +131,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
                                GNUNET_CRYPTO_random_u32
                                (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg))
   {
-    fprintf (stderr, "ERROR: `%s'\n", msg);
+    FPRINTF (stderr, "ERROR: `%s'\n", msg);
     GNUNET_free_non_null (msg);
     return;
   }
@@ -160,7 +160,7 @@ iterate_one_shot (void *cls, const GNUNET_HashCode * key, uint32_t size,
   guid = uid;
   crc->phase++;
 #if VERBOSE
-  fprintf (stderr,
+  FPRINTF (stderr,
            "Found result type=%u, priority=%u, size=%u, expire=%llu, key %s\n",
            type, priority, size, (unsigned long long) expiration.abs_value,
            GNUNET_h2s (key));
@@ -230,7 +230,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     crc->phase = RP_ERROR;
   }
 #if VERBOSE
-  fprintf (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt);
+  FPRINTF (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt);
 #endif
   switch (crc->phase)
   {
@@ -324,7 +324,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
   GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name);
   if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env)))
   {
-    fprintf (stderr, "Failed to load plugin `%s'!\n", name);
+    FPRINTF (stderr, "Failed to load plugin `%s'!\n", name);
     return NULL;
   }
   GNUNET_free (libname);
@@ -343,8 +343,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   api = load_plugin (c);
   if (api == NULL)
   {
-    fprintf (stderr,
-             "Could not initialize plugin, assuming database not configured. Test not run!\n");
+    FPRINTF (stderr,
+             "Could not initialize plugin, assuming database not configured. Test not run!\n", NULL);
     return;
   }
   crc = GNUNET_malloc (sizeof (struct CpsRunContext));
@@ -378,7 +378,7 @@ check ()
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
                       "test-plugin-datastore", "nohelp", options, &run, NULL);
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %u\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %u\n", ok);
   return ok;
 }
 
index 763ff8e6fdbd0f9b8be8e45e102db018f0cfff8d..6ad4b30f8e05d0b84eb02425effc663037780b18 100644 (file)
@@ -129,7 +129,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
                      unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
                      size_t size, const void *data)
 {
-  fprintf (stdout, "Result %d, type %d:\n%.*s\n", result_count, type,
+  FPRINTF (stdout, "Result %d, type %d:\n%.*s\n", result_count, type,
            (unsigned int) size, (char *) data);
   result_count++;
 }
@@ -155,7 +155,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   if (query_key == NULL)
   {
     if (verbose)
-      fprintf (stderr, "Must provide key for DHT GET!\n");
+      FPRINTF (stderr, "%s",  "Must provide key for DHT GET!\n");
     ret = 1;
     return;
   }
@@ -165,12 +165,12 @@ run (void *cls, char *const *args, const char *cfgfile,
   if (dht_handle == NULL)
   {
     if (verbose)
-      fprintf (stderr, "Couldn't connect to DHT service!\n");
+      FPRINTF (stderr, "%s",  "Couldn't connect to DHT service!\n");
     ret = 1;
     return;
   }
   else if (verbose)
-    fprintf (stderr, "Connected to DHT service!\n");
+    FPRINTF (stderr, "%s",  "Connected to DHT service!\n");
 
   if (query_type == GNUNET_BLOCK_TYPE_ANY)      /* Type of data not set */
     query_type = GNUNET_BLOCK_TYPE_TEST;
@@ -182,7 +182,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   absolute_timeout = GNUNET_TIME_relative_to_absolute (timeout);
 
   if (verbose)
-    fprintf (stderr, "Issuing GET request for %s!\n", query_key);
+    FPRINTF (stderr, "Issuing GET request for %s!\n", query_key);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
                                 (absolute_timeout), &cleanup_task, NULL);
   get_handle =
index 079a8866e9a91cd157a7a2342c584a3cdf2bacbf..ef5ae5ea758d42e06bebab2499896f06600bf934 100644 (file)
@@ -97,7 +97,7 @@ void
 message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (verbose)
-    fprintf (stderr, _("PUT request sent!\n"));
+    FPRINTF (stderr, "%s",  _("PUT request sent!\n"));
   GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
 }
 
@@ -121,7 +121,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if ((query_key == NULL) || (data == NULL))
   {
-    fprintf (stderr, _("Must provide KEY and DATA for DHT put!\n"));
+    FPRINTF (stderr, "%s",  _("Must provide KEY and DATA for DHT put!\n"));
     ret = 1;
     return;
   }
@@ -129,12 +129,12 @@ run (void *cls, char *const *args, const char *cfgfile,
   dht_handle = GNUNET_DHT_connect (cfg, 1);
   if (dht_handle == NULL)
   {
-    fprintf (stderr, _("Could not connect to %s service!\n"), "DHT");
+    FPRINTF (stderr, _("Could not connect to %s service!\n"), "DHT");
     ret = 1;
     return;
   }
   else if (verbose)
-    fprintf (stderr, _("Connected to %s service!\n"), "DHT");
+    FPRINTF (stderr, _("Connected to %s service!\n"), "DHT");
 
   if (query_type == GNUNET_BLOCK_TYPE_ANY)      /* Type of data not set */
     query_type = GNUNET_BLOCK_TYPE_TEST;
@@ -149,7 +149,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                          expiration_seconds));
 
   if (verbose)
-    fprintf (stderr, _("Issuing put request for `%s' with data `%s'!\n"),
+    FPRINTF (stderr, _("Issuing put request for `%s' with data `%s'!\n"),
              query_key, data);
   GNUNET_DHT_put (dht_handle, &key, replication, GNUNET_DHT_RO_NONE, query_type,
                   strlen (data), data, expiration, timeout, &message_sent_cont,
index e636c08bace133ad85f6bb382041742c3de6c3c5..4ec2f2ae9664a3a95367ec59fc12ac903f6b6205 100644 (file)
@@ -97,7 +97,7 @@ static int ok;
 static GNUNET_SCHEDULER_TaskIdentifier die_task;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -133,7 +133,7 @@ end_badly ()
 {
   /* do work here */
 #if VERBOSE
-  fprintf (stderr, "Ending on an unhappy note.\n");
+  FPRINTF (stderr, "%s",  "Ending on an unhappy note.\n");
 #endif
 
   if ((retry_context.peer_ctx != NULL) &&
index 1a4fbaf13eb60b845693113663d9e9ec7bab929d..8aba2743d0f87a0c40ca2ebc04012fbf22bb5d41 100644 (file)
@@ -220,7 +220,7 @@ shutdown_callback (void *cls, const char *emsg)
 {
   if (emsg != NULL)
   {
-    fprintf (stderr, "Failed to shutdown testing topology: %s\n", emsg);
+    FPRINTF (stderr, "Failed to shutdown testing topology: %s\n", emsg);
     if (ok == 0)
       ok = 2;
   }
@@ -311,7 +311,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
   struct StatMaster *sm = cls;
 
   stats[sm->value].total += value;
-  fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
+  FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
            name, (unsigned long long) value);
   return GNUNET_OK;
 }
@@ -369,7 +369,7 @@ stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     i = 0;
     while (stats[i].name != NULL)
     {
-      fprintf (stderr, "Total  : %12s/%50s = %12llu\n", stats[i].subsystem,
+      FPRINTF (stderr, "Total  : %12s/%50s = %12llu\n", stats[i].subsystem,
                stats[i].name, (unsigned long long) stats[i].total);
       i++;
     }
@@ -439,7 +439,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct TestGetContext *test_get;
 
   die_task = GNUNET_SCHEDULER_NO_TASK;
-  fprintf (stderr, "Failing test with error: `%s'!\n", emsg);
+  FPRINTF (stderr, "Failing test with error: `%s'!\n", emsg);
   while (NULL != (test_put = all_puts_head))
   {
     if (test_put->task != GNUNET_SCHEDULER_NO_TASK)
@@ -484,7 +484,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (test_get->succeeded != GNUNET_YES)
   {
     gets_failed++;
-    fprintf (stderr, "Get from peer %s for key %s failed!\n",
+    FPRINTF (stderr, "Get from peer %s for key %s failed!\n",
              GNUNET_i2s (&test_get->daemon->id), GNUNET_h2s (&search_key));
   }
   GNUNET_assert (test_get->get_handle != NULL);
@@ -500,7 +500,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if ((gets_failed > 10) && (outstanding_gets == 0))
   {
     /* Had more than 10% failures */
-    fprintf (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed,
+    FPRINTF (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed,
              gets_failed);
     GNUNET_SCHEDULER_cancel (die_task);
     ok = 1;
@@ -510,7 +510,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
   if ((gets_completed + gets_failed == num_peers * num_peers) && (outstanding_gets == 0))       /* All gets successful */
   {
-    fprintf (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed,
+    FPRINTF (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed,
              gets_failed);
     GNUNET_SCHEDULER_cancel (die_task);
     ok = 0;
@@ -552,19 +552,19 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
   {
     unsigned int i;
 
-    fprintf (stderr, "PUT (%u) Path: ", test_get->uid);
+    FPRINTF (stderr, "PUT (%u) Path: ", test_get->uid);
     for (i = 0; i < put_path_length; i++)
-      fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
-    fprintf (stderr, "\n");
+      FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
+    FPRINTF (stderr, "%s",  "\n");
   }
   if (get_path != NULL)
   {
     unsigned int i;
 
-    fprintf (stderr, "GET (%u) Path: ", test_get->uid);
+    FPRINTF (stderr, "GET (%u) Path: ", test_get->uid);
     for (i = 0; i < get_path_length; i++)
-      fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
-    fprintf (stderr, "%s%s\n", get_path_length > 0 ? "->" : "",
+      FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
+    FPRINTF (stderr, "%s%s\n", get_path_length > 0 ? "->" : "",
              GNUNET_i2s (&test_get->daemon->id));
   }
 #endif
@@ -572,7 +572,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
   if ((0 != memcmp (&search_key, key, sizeof (GNUNET_HashCode))) ||
       (0 != memcmp (original_data, data, sizeof (original_data))))
   {
-    fprintf (stderr, "Key or data is not the same as was inserted!\n");
+    FPRINTF (stderr, "%s",  "Key or data is not the same as was inserted!\n");
     return;
   }
   gets_completed++;
@@ -639,7 +639,7 @@ start_gets (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct TestGetContext *test_get;
 
 #if VERBOSE
-  fprintf (stderr, "Issuing %llu GETs\n",
+  FPRINTF (stderr, "Issuing %llu GETs\n",
            (unsigned long long) (num_peers * num_peers));
 #endif
   for (i = 0; i < num_peers; i++)
@@ -697,7 +697,7 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_assert (test_put->dht_handle != NULL);
   outstanding_puts++;
 #if VERBOSE > 2
-  fprintf (stderr, "PUT %u at `%s'\n", test_put->uid,
+  FPRINTF (stderr, "PUT %u at `%s'\n", test_put->uid,
            GNUNET_i2s (&test_put->daemon->id));
 #endif
   GNUNET_DHT_put (test_put->dht_handle, &key, 1, route_option,
@@ -725,7 +725,7 @@ run_dht_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   die_task =
       GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly,
                                     "from setup puts/gets");
-  fprintf (stderr, "Issuing %llu PUTs (one per peer)\n",
+  FPRINTF (stderr, "Issuing %llu PUTs (one per peer)\n",
            (unsigned long long) (num_peers * num_peers));
   for (i = 0; i < num_peers * num_peers; i++)
   {
@@ -750,7 +750,7 @@ startup_done (void *cls, const char *emsg)
 {
   if (emsg != NULL)
   {
-    fprintf (stderr, "Failed to setup topology: %s\n", emsg);
+    FPRINTF (stderr, "Failed to setup topology: %s\n", emsg);
     die_task = GNUNET_SCHEDULER_add_now (&end_badly, "topology setup failed");
     return;
   }
index 04198b48b03ff69dc999a61376790eb92f13a3b6..2adfda0ef6f0d06c0271fcad7408c853cb6257a7 100644 (file)
@@ -138,7 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   const char *emsg = cls;
 
-  fprintf (stderr, "Error: %s\n", emsg);
+  FPRINTF (stderr, "Error: %s\n", emsg);
   if (curr_get_ctx.retry_task != GNUNET_SCHEDULER_NO_TASK)
   {
     GNUNET_SCHEDULER_cancel (curr_get_ctx.retry_task);
@@ -183,7 +183,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
   if (0 !=
       memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode)))
   {
-    fprintf (stderr, "??\n");
+    FPRINTF (stderr, "%s",  "??\n");
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Key returned is not the same key as was searched for!\n");
     GNUNET_SCHEDULER_cancel (die_task);
@@ -192,7 +192,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
                                   "key mismatch in get response!\n");
     return;
   }
-  fprintf (stderr, "!\n");
+  FPRINTF (stderr, "%s",  "!\n");
   if (get_context->retry_task != GNUNET_SCHEDULER_NO_TASK)
   {
     GNUNET_SCHEDULER_cancel (get_context->retry_task);
@@ -234,7 +234,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                 get_context->get_attempts);
   else
   {
-    fprintf (stderr, "?\n");
+    FPRINTF (stderr, "%s",  "?\n");
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Too many attempts failed, ending test!\n",
                 get_context->get_attempts);
@@ -244,7 +244,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                   "GET attempt failed, ending test!\n");
     return;
   }
-  fprintf (stderr, ".");
+  FPRINTF (stderr, "%s",  ".");
   get_context->get_attempts++;
   get_context->retry_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -381,7 +381,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
 {
   if (emsg != NULL)
   {
-    fprintf (stderr, "Failed to start daemon: `%s'\n", emsg);
+    FPRINTF (stderr, "Failed to start daemon: `%s'\n", emsg);
     return;
   }
   GNUNET_assert (id != NULL);
index 61a3df0a4af6bea6322ee9f68a704464deea20f7..c30a3f3276e8d1cca7e67b4cde12464a7fe7f67d 100644 (file)
@@ -219,17 +219,17 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
 #if VERBOSE
   if (put_path != NULL)
   {
-    fprintf (stderr, "PUT Path: ");
+    FPRINTF (stderr, "%s",  "PUT Path: ");
     for (i = 0; i < put_path_length; i++)
-      fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
-    fprintf (stderr, "\n");
+      FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i]));
+    FPRINTF (stderr, "%s",  "\n");
   }
   if (get_path != NULL)
   {
-    fprintf (stderr, "GET Path: ");
+    FPRINTF (stderr, "%s",  "GET Path: ");
     for (i = 0; i < get_path_length; i++)
-      fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
-    fprintf (stderr, "\n");
+      FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i]));
+    FPRINTF (stderr, "%s",  "\n");
   }
 #endif
 
index 2e4962964fdf2317425c3f787044b81ab161bb16..435bb2a608f6fce5d576daec002e8a9972a6a19f 100644 (file)
@@ -274,8 +274,8 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #endif
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
     fclose (dotOutFile);
+    FPRINTF (dotOutFile, "%s",  "}");
   }
 
   ok = 0;
@@ -382,7 +382,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 }
@@ -896,18 +896,18 @@ all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (dotOutFile != NULL)
   {
     if (distance == 1)
-      fprintf (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname);
+      FPRINTF (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname);
     else if (distance == 2)
-      fprintf (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname,
                second_shortname);
     else if (distance == 3)
-      fprintf (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname,
                second_shortname);
     else if (distance == 4)
-      fprintf (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname,
                second_shortname);
     else
-      fprintf (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname,
                second_shortname);
   }
   GNUNET_free (second_shortname);
@@ -1067,7 +1067,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   dotOutFile = fopen (dotOutFileName, "w");
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "strict graph G {\n");
+    FPRINTF (dotOutFile, "%s",  "strict graph G {\n");
   }
 
 #if VERBOSE
index 1f7a1776a15bbce55227b4ff4b49108b9a08fced..cbfb8efe456df8f647eaee1a67fc0e1f4dd4c306 100644 (file)
@@ -91,7 +91,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr)
   const char *buf;
 
 #if DETAILS
-  fprintf (stderr, "!");        /* message complete, good! */
+  FPRINTF (stderr, "%s",  "!");        /* message complete, good! */
 #endif
   buf = (const char *) hdr;
   for (i = sizeof (struct GNUNET_MessageHeader); i < ntohs (hdr->size); i++)
@@ -99,7 +99,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr)
   total++;
 #if ! DETAILS
   if (0 == (total % (NUM_MSGS / 100)))
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
 #endif
   /* tolerate 10% loss, i.e. due to duplicate fragment IDs */
   if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0))
@@ -132,7 +132,7 @@ proc_acks (void *cls, uint32_t msg_id, const struct GNUNET_MessageHeader *hdr)
     if (ret == GNUNET_OK)
     {
 #if DETAILS
-      fprintf (stderr, "@");    /* good ACK */
+      FPRINTF (stderr, "%s",  "@");    /* good ACK */
 #endif
       GNUNET_FRAGMENT_context_destroy (frags[i]);
       frags[i] = NULL;
@@ -142,14 +142,14 @@ proc_acks (void *cls, uint32_t msg_id, const struct GNUNET_MessageHeader *hdr)
     if (ret == GNUNET_NO)
     {
 #if DETAILS
-      fprintf (stderr, "@");    /* good ACK */
+      FPRINTF (stderr, "%s",  "@");    /* good ACK */
 #endif
       acks++;
       return;
     }
   }
 #if DETAILS
-  fprintf (stderr, "_");        /* BAD: ack that nobody feels responsible for... */
+  FPRINTF (stderr, "%s",  "_");        /* BAD: ack that nobody feels responsible for... */
 #endif
 }
 
@@ -171,21 +171,21 @@ proc_frac (void *cls, const struct GNUNET_MessageHeader *hdr)
   }
   if (NULL == defrag)
   {
-    fprintf (stderr, "E");      /* Error: frag after shutdown!? */
+    FPRINTF (stderr, "%s",  "E");      /* Error: frag after shutdown!? */
     return;
   }
   ret = GNUNET_DEFRAGMENT_process_fragment (defrag, hdr);
   if (ret == GNUNET_NO)
   {
 #if DETAILS
-    fprintf (stderr, "?");      /* duplicate fragment */
+    FPRINTF (stderr, "%s",  "?");      /* duplicate fragment */
 #endif
     dups++;
   }
   else if (ret == GNUNET_OK)
   {
 #if DETAILS
-    fprintf (stderr, ".");      /* good fragment */
+    FPRINTF (stderr, "%s",  ".");      /* good fragment */
 #endif
     fragc++;
   }
@@ -254,7 +254,7 @@ main (int argc, char *argv[])
                                    100);
   GNUNET_PROGRAM_run (5, argv_prog, "test-fragmentation", "nohelp", options,
                       &run, NULL);
-  fprintf (stderr,
+  FPRINTF (stderr,
            "\nHad %u good fragments, %u duplicate fragments, %u acks and %u simulated drops of acks\n",
            fragc, dups, acks, ack_drops);
   return ret;
index f2b99f48deccb08b7a59b4ce3a8d3d46e19cdaa3..adb071e8df83c7ee6a1b5cc9d18a07301861c4af 100644 (file)
@@ -129,7 +129,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if (NULL == args[0])
   {
-    fprintf (stderr, _("You must specify a filename to inspect."));
+    FPRINTF (stderr, "%s",  _("You must specify a filename to inspect."));
     ret = 1;
     return;
   }
index f38805c2b74f4735a94e752328a9b64ab6c85ef8..9e4a8c2f7eef1e5352de770eb5ef95540d30a9a5 100644 (file)
@@ -97,7 +97,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
   {
   case GNUNET_FS_STATUS_DOWNLOAD_START:
     if (verbose > 1)
-      fprintf (stderr, _("Starting download `%s'.\n"),
+      FPRINTF (stderr, _("Starting download `%s'.\n"),
                info->value.download.filename);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -108,7 +108,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
                                           1000LL /
                                           (info->value.download.
                                            duration.rel_value + 1));
-      fprintf (stdout,
+      FPRINTF (stdout,
                _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
                info->value.download.filename,
                (unsigned long long) info->value.download.completed,
@@ -118,7 +118,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     }
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
-    fprintf (stderr, _("Error downloading: %s.\n"),
+    FPRINTF (stderr, _("Error downloading: %s.\n"),
              info->value.download.specifics.error.message);
     GNUNET_SCHEDULER_shutdown ();
     break;
@@ -126,7 +126,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
                                         (info->value.download.
                                          duration.rel_value + 1));
-    fprintf (stdout, _("Downloading `%s' done (%s/s).\n"),
+    FPRINTF (stdout, _("Downloading `%s' done (%s/s).\n"),
              info->value.download.filename, s);
     GNUNET_free (s);
     if (info->value.download.dc == dc)
@@ -141,7 +141,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
   case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE:
     break;
   default:
-    fprintf (stderr, _("Unexpected status: %d\n"), info->status);
+    FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
     break;
   }
   return NULL;
@@ -166,27 +166,27 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if (NULL == args[0])
   {
-    fprintf (stderr, _("You need to specify a URI argument.\n"));
+    FPRINTF (stderr, "%s",  _("You need to specify a URI argument.\n"));
     return;
   }
   uri = GNUNET_FS_uri_parse (args[0], &emsg);
   if (NULL == uri)
   {
-    fprintf (stderr, _("Failed to parse URI: %s\n"), emsg);
+    FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg);
     GNUNET_free (emsg);
     ret = 1;
     return;
   }
   if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri)))
   {
-    fprintf (stderr, _("Only CHK or LOC URIs supported.\n"));
+    FPRINTF (stderr, "%s",  _("Only CHK or LOC URIs supported.\n"));
     ret = 1;
     GNUNET_FS_uri_destroy (uri);
     return;
   }
   if (NULL == filename)
   {
-    fprintf (stderr, _("Target filename must be specified.\n"));
+    FPRINTF (stderr, "%s",  _("Target filename must be specified.\n"));
     ret = 1;
     GNUNET_FS_uri_destroy (uri);
     return;
@@ -200,7 +200,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                        request_parallelism, GNUNET_FS_OPTIONS_END);
   if (NULL == ctx)
   {
-    fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
+    FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
     GNUNET_FS_uri_destroy (uri);
     ret = 1;
     return;
index dc86ce9848d6c9fa66a27636242b39dc9cbc1149..8cf08ec28b67e0fafccea76acc4c4d4916f70ccc 100644 (file)
@@ -72,9 +72,9 @@ static int
 print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id)
 {
   if (verbose)
-    fprintf (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename);
+    FPRINTF (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename);
   else
-    fprintf (stdout, "%s\n", filename);
+    FPRINTF (stdout, "%s\n", filename);
   return GNUNET_OK;
 }
 
index ce0d24506e2a67bd26a98fe12447c919a8706723..412ddd2b068f46553d7ca5ecfb79bf3076aecbc3 100644 (file)
@@ -100,7 +100,7 @@ ns_printer (void *cls, const char *name, const GNUNET_HashCode * id)
   struct GNUNET_CRYPTO_HashAsciiEncoded enc;
 
   GNUNET_CRYPTO_hash_to_enc (id, &enc);
-  fprintf (stdout, "%s (%s)\n", name, (const char *) &enc);
+  FPRINTF (stdout, "%s (%s)\n", name, (const char *) &enc);
 }
 
 
@@ -116,9 +116,9 @@ pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym,
     GNUNET_break (0);
     return GNUNET_OK;
   }
-  fprintf (stdout, "%s (%d):\n", id, rating);
+  FPRINTF (stdout, "%s (%d):\n", id, rating);
   GNUNET_CONTAINER_meta_data_iterate (md, &EXTRACTOR_meta_data_print, stdout);
-  fprintf (stdout, "\n");
+  FPRINTF (stdout, "%s",  "\n");
   GNUNET_free (id);
   return GNUNET_OK;
 }
@@ -133,7 +133,7 @@ post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
 
   if (emsg != NULL)
   {
-    fprintf (stderr, "%s", emsg);
+    FPRINTF (stderr, "%s", emsg);
     ret = 1;
   }
   if (ns != NULL)
@@ -237,16 +237,16 @@ run (void *cls, char *const *args, const char *cfgfile,
       else
       {
         if (ksk_uri != NULL)
-          fprintf (stderr, _("Option `%s' ignored\n"), "-k");
+          FPRINTF (stderr, _("Option `%s' ignored\n"), "-k");
       }
     }
   }
   else
   {
     if (root_identifier != NULL)
-      fprintf (stderr, _("Option `%s' ignored\n"), "-r");
+      FPRINTF (stderr, _("Option `%s' ignored\n"), "-r");
     if (ksk_uri != NULL)
-      fprintf (stderr, _("Option `%s' ignored\n"), "-k");
+      FPRINTF (stderr, _("Option `%s' ignored\n"), "-k");
   }
 
   post_advertising (NULL, NULL, NULL);
index ffcdefdc6ba21cf718e292eaf4218028206c7a2f..dd3bf681004660fd78b26d969ae0c256e2e295e6 100644 (file)
@@ -115,7 +115,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     if (verbose)
     {
       s = GNUNET_STRINGS_relative_time_to_string (info->value.publish.eta);
-      fprintf (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"),
+      FPRINTF (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"),
                info->value.publish.filename,
                (unsigned long long) info->value.publish.completed,
                (unsigned long long) info->value.publish.size, s);
@@ -123,7 +123,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     }
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, _("Error publishing: %s.\n"),
+    FPRINTF (stderr, _("Error publishing: %s.\n"),
              info->value.publish.specifics.error.message);
     if (kill_task != GNUNET_SCHEDULER_NO_TASK)
     {
@@ -134,11 +134,11 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
-    fprintf (stdout, _("Publishing `%s' done.\n"),
+    FPRINTF (stdout, _("Publishing `%s' done.\n"),
              info->value.publish.filename);
     s = GNUNET_FS_uri_to_string (info->value.publish.specifics.
                                  completed.chk_uri);
-    fprintf (stdout, _("URI is `%s'.\n"), s);
+    FPRINTF (stdout, _("URI is `%s'.\n"), s);
     GNUNET_free (s);
     if (info->value.publish.pctx == NULL)
     {
@@ -157,10 +157,10 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
   case GNUNET_FS_STATUS_UNINDEX_PROGRESS:
     return NULL;
   case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
-    fprintf (stderr, _("Cleanup after abort complete.\n"));
+    FPRINTF (stderr, "%s",  _("Cleanup after abort complete.\n"));
     return NULL;
   default:
-    fprintf (stderr, _("Unexpected status: %d\n"), info->status);
+    FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
     return NULL;
   }
   return "";                    /* non-null */
@@ -190,7 +190,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
     return 0;
   if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME)
     return 0;
-  fprintf (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data);
+  FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data);
   return 0;
 }
 
@@ -206,7 +206,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
 static int
 keyword_printer (void *cls, const char *keyword, int is_mandatory)
 {
-  fprintf (stdout, "\t%s\n", keyword);
+  FPRINTF (stdout, "\t%s\n", keyword);
   return GNUNET_OK;
 }
 
@@ -269,14 +269,14 @@ publish_inspector (void *cls, struct GNUNET_FS_FileInformation *fi,
     fn = GNUNET_CONTAINER_meta_data_get_by_type (m,
                                                  EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
     fs = GNUNET_STRINGS_byte_size_fancy (length);
-    fprintf (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs);
+    FPRINTF (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs);
     GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL);
-    fprintf (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs);
+    FPRINTF (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs);
     GNUNET_free (fn);
     GNUNET_free (fs);
     if (NULL != *uri)
       GNUNET_FS_uri_ksk_get_keywords (*uri, &keyword_printer, NULL);
-    fprintf (stdout, "\n");
+    FPRINTF (stdout, "%s",  "\n");
   }
   if (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (m))
     GNUNET_FS_file_information_inspect (fi, &publish_inspector, fi);
@@ -293,7 +293,7 @@ uri_sks_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri,
 {
   if (emsg != NULL)
   {
-    fprintf (stderr, "%s\n", emsg);
+    FPRINTF (stderr, "%s\n", emsg);
     ret = 1;
   }
   GNUNET_FS_uri_destroy (uri);
@@ -314,7 +314,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri,
 
   if (emsg != NULL)
   {
-    fprintf (stderr, "%s\n", emsg);
+    FPRINTF (stderr, "%s\n", emsg);
     ret = 1;
   }
   if (pseudonym != NULL)
@@ -322,7 +322,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri,
     ns = GNUNET_FS_namespace_create (ctx, pseudonym);
     if (ns == NULL)
     {
-      fprintf (stderr, _("Failed to create namespace `%s'\n"), pseudonym);
+      FPRINTF (stderr, _("Failed to create namespace `%s'\n"), pseudonym);
       ret = 1;
     }
     else
@@ -385,7 +385,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   {
     if (NULL == this_id)
     {
-      fprintf (stderr, _("Option `%s' is required when using option `%s'.\n"),
+      FPRINTF (stderr, _("Option `%s' is required when using option `%s'.\n"),
                "-t", "-P");
       ret = -1;
       return;
@@ -395,14 +395,14 @@ run (void *cls, char *const *args, const char *cfgfile,
   {                             /* ordinary insertion checks */
     if (NULL != next_id)
     {
-      fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
+      FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
                "-N", "-P");
       ret = -1;
       return;
     }
     if (NULL != this_id)
     {
-      fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
+      FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
                "-t", "-P");
       ret = -1;
       return;
@@ -414,7 +414,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                        GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
   if (NULL == ctx)
   {
-    fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
+    FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
     ret = 1;
     return;
   }
@@ -424,7 +424,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     namespace = GNUNET_FS_namespace_create (ctx, pseudonym);
     if (NULL == namespace)
     {
-      fprintf (stderr, _("Could not create namespace `%s'\n"), pseudonym);
+      FPRINTF (stderr, _("Could not create namespace `%s'\n"), pseudonym);
       GNUNET_FS_stop (ctx);
       ret = 1;
       return;
@@ -436,7 +436,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     uri = GNUNET_FS_uri_parse (uri_string, &emsg);
     if (uri == NULL)
     {
-      fprintf (stderr, _("Failed to parse URI: %s\n"), emsg);
+      FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg);
       GNUNET_free (emsg);
       if (namespace != NULL)
         GNUNET_FS_namespace_delete (namespace, GNUNET_NO);
@@ -494,7 +494,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   EXTRACTOR_plugin_remove_all (plugins);
   if (fi == NULL)
   {
-    fprintf (stderr, _("Could not publish `%s': %s\n"), args[0], emsg);
+    FPRINTF (stderr, _("Could not publish `%s': %s\n"), args[0], emsg);
     GNUNET_free (emsg);
     if (namespace != NULL)
       GNUNET_FS_namespace_delete (namespace, GNUNET_NO);
@@ -517,7 +517,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                 GNUNET_FS_PUBLISH_OPTION_NONE);
   if (NULL == pc)
   {
-    fprintf (stderr, _("Could not start publishing.\n"));
+    FPRINTF (stderr, "%s",  _("Could not start publishing.\n"));
     GNUNET_FS_stop (ctx);
     ret = 1;
     return;
index 3a30f6c2bca895f97ce56af4e5b179625cbf8efc..c221a30f888aa5d15b88210250e2273f638d92b2 100644 (file)
@@ -107,7 +107,7 @@ clean_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                             GNUNET_DISK_PERM_USER_READ |
                             GNUNET_DISK_PERM_USER_WRITE))
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              _("Failed to write directory with search results to `%s'\n"),
              output_filename);
   }
@@ -178,7 +178,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     /* ignore */
     break;
   case GNUNET_FS_STATUS_SEARCH_ERROR:
-    fprintf (stderr, _("Error searching: %s.\n"),
+    FPRINTF (stderr, _("Error searching: %s.\n"),
              info->value.search.specifics.error.message);
     GNUNET_SCHEDULER_shutdown ();
     break;
@@ -187,7 +187,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   default:
-    fprintf (stderr, _("Unexpected status: %d\n"), info->status);
+    FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
     break;
   }
   return NULL;
@@ -228,7 +228,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   uri = GNUNET_FS_uri_ksk_create_from_args (argc, (const char **) args);
   if (NULL == uri)
   {
-    fprintf (stderr, _("Could not create keyword URI from arguments.\n"));
+    FPRINTF (stderr, "%s",  _("Could not create keyword URI from arguments.\n"));
     ret = 1;
     return;
   }
@@ -238,7 +238,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                        GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
   if (NULL == ctx)
   {
-    fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
+    FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
     GNUNET_FS_uri_destroy (uri);
     ret = 1;
     return;
@@ -252,7 +252,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   GNUNET_FS_uri_destroy (uri);
   if (NULL == sc)
   {
-    fprintf (stderr, _("Could not start searching.\n"));
+    FPRINTF (stderr, "%s",  _("Could not start searching.\n"));
     GNUNET_FS_stop (ctx);
     ret = 1;
     return;
index 25560ca10261fb6dbf93a3d93b00e99f30122e24..3e8308df249c95f81877890e20f026f8cd1b7196 100644 (file)
@@ -86,19 +86,19 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     if (verbose)
     {
       s = GNUNET_STRINGS_relative_time_to_string (info->value.unindex.eta);
-      fprintf (stdout, _("Unindexing at %llu/%llu (%s remaining)\n"),
+      FPRINTF (stdout, _("Unindexing at %llu/%llu (%s remaining)\n"),
                (unsigned long long) info->value.unindex.completed,
                (unsigned long long) info->value.unindex.size, s);
       GNUNET_free (s);
     }
     break;
   case GNUNET_FS_STATUS_UNINDEX_ERROR:
-    fprintf (stderr, _("Error unindexing: %s.\n"),
+    FPRINTF (stderr, _("Error unindexing: %s.\n"),
              info->value.unindex.specifics.error.message);
     GNUNET_SCHEDULER_shutdown ();
     break;
   case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
-    fprintf (stdout, _("Unindexing done.\n"));
+    FPRINTF (stdout, "%s",  _("Unindexing done.\n"));
     GNUNET_SCHEDULER_shutdown ();
     break;
   case GNUNET_FS_STATUS_UNINDEX_STOPPED:
@@ -106,7 +106,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   default:
-    fprintf (stderr, _("Unexpected status: %d\n"), info->status);
+    FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
     break;
   }
   return NULL;
@@ -138,14 +138,14 @@ run (void *cls, char *const *args, const char *cfgfile,
                        GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
   if (NULL == ctx)
   {
-    fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
+    FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS");
     ret = 1;
     return;
   }
   uc = GNUNET_FS_unindex_start (ctx, args[0], NULL);
   if (NULL == uc)
   {
-    fprintf (stderr, _("Could not start unindex operation.\n"));
+    FPRINTF (stderr, "%s",  _("Could not start unindex operation.\n"));
     GNUNET_FS_stop (ctx);
     return;
   }
index bb8c8d8c21ffbd2bec44d3f9dc4f9d15c27be06f..6b9b1abd5c57035cd5298052639216e09eb36c5b 100644 (file)
@@ -120,7 +120,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 {
   struct StatMaster *sm = cls;
 
-  fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
+  FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
            name, (unsigned long long) value);
   return GNUNET_OK;
 }
@@ -199,7 +199,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     fancy =
         GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
                                         1000LL / del.rel_value);
-    fprintf (stdout, "Download speed was %s/s\n", fancy);
+    FPRINTF (stdout, "Download speed was %s/s\n", fancy);
     GNUNET_free (fancy);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",
                 (unsigned long long) FILESIZE);
index 9f5a36b7ea987f9b2ae656bc0b88d4b2daf98795..94b7648f8c8e92d61d2c833802261d7c45df1ef8 100644 (file)
@@ -153,7 +153,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 {
   struct StatMaster *sm = cls;
 
-  fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
+  FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem,
            name, (unsigned long long) value);
   return GNUNET_OK;
 }
@@ -234,7 +234,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     fancy =
         GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
                                         1000LL / del.rel_value);
-    fprintf (stderr, "Download speed of type `%s' was %s/s\n", type, fancy);
+    FPRINTF (stderr, "Download speed of type `%s' was %s/s\n", type, fancy);
     GNUNET_free (fancy);
     if (NUM_DAEMONS != ++download_counter)
       return;                   /* more downloads to come */
index 81012e764cb27ea7b06184d6e6f6398d06ef3a7f..96ad29cb406c5ae065b22b5ab2c441cba7a87f96 100644 (file)
@@ -59,7 +59,7 @@ processor (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
       return;
     }
   }
-  fprintf (stderr, "Error at %s:%d\n", __FILE__, __LINE__);
+  FPRINTF (stderr, "Error at %s:%d\n", __FILE__, __LINE__);
 }
 
 static int
@@ -131,7 +131,7 @@ testDirectory (unsigned int i)
   GNUNET_FS_directory_builder_finish (db, &dlen, (void **) &data);
   s = GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration
                                               (start));
-  fprintf (stdout,
+  FPRINTF (stdout,
            "Creating directory with %u entires and total size %llu took %s\n",
            i, (unsigned long long) dlen, s);
   GNUNET_free (s);
index 19ef6e76a01005ad26f9e9d5ce5ae0379456d4cd..93ad0cbba7f8a90d9e4107636a46e6ba7ef85e76 100644 (file)
@@ -190,14 +190,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
-    fprintf (stderr, "Error downloading file: %s\n",
+    FPRINTF (stderr, "Error downloading file: %s\n",
              event->value.download.specifics.error.message);
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
index 3f932f78316ea0d84ae4902d5b9288c669058239..6592f6efa3ee0b6519b7c44e3fa953a299be161d 100644 (file)
@@ -191,14 +191,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
-    fprintf (stderr, "Error downloading file: %s\n",
+    FPRINTF (stderr, "Error downloading file: %s\n",
              event->value.download.specifics.error.message);
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
index 9bc37235edf9aa0add3a793532fec86f77007eb4..1e1ed22f828e5d923679076f5e09d70921df263c 100644 (file)
@@ -211,14 +211,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
-    fprintf (stderr, "Error downloading file: %s\n",
+    FPRINTF (stderr, "Error downloading file: %s\n",
              event->value.download.specifics.error.message);
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
index cede523ec3aa33f57b413b1f1cab602cc30a4566..29d15c49224b37a7667ffd6599c670e4843a4540 100644 (file)
@@ -213,14 +213,14 @@ eventCallback (void *cls, const GNUNET_FSUI_Event * event)
 #endif
     break;
   case GNUNET_FSUI_unindex_error:
-    fprintf (stderr, "Error unindexing: %s\n",
+    FPRINTF (stderr, "Error unindexing: %s\n",
              event->data.UnindexError.message);
     break;
   case GNUNET_FSUI_upload_error:
-    fprintf (stderr, "Error uploading: %s\n", event->data.UploadError.message);
+    FPRINTF (stderr, "Error uploading: %s\n", event->data.UploadError.message);
     break;
   case GNUNET_FSUI_download_error:
-    fprintf (stderr, "Error downloading: %s\n",
+    FPRINTF (stderr, "Error downloading: %s\n",
              event->data.DownloadError.message);
     break;
   case GNUNET_FSUI_download_aborted:
@@ -277,7 +277,7 @@ main (int argc, char *argv[])
     GNUNET_GC_free (cfg);
     return -1;
   }
-  fprintf (stderr, "Setup...\n");
+  FPRINTF (stderr, "%s",  "Setup...\n");
 #if START_DAEMON
   GNUNET_disk_directory_remove (NULL,
                                 "/tmp/gnunet-fsui-recursive_download_test/");
@@ -297,7 +297,7 @@ main (int argc, char *argv[])
   kuri =
       GNUNET_ECRS_keyword_command_line_to_uri (ectx, 2,
                                                (const char **) keywords);
-  fprintf (stderr, "Uploading...\n");
+  FPRINTF (stderr, "%s",  "Uploading...\n");
   waitForEvent = GNUNET_FSUI_upload_completed;
   upload =
       GNUNET_FSUI_upload_start (ctx, fn,
@@ -322,7 +322,7 @@ main (int argc, char *argv[])
   upload = NULL;
   CHECK (upURI != NULL);
 
-  fprintf (stderr, "Downloading...\n");
+  FPRINTF (stderr, "%s",  "Downloading...\n");
   waitForEvent = GNUNET_FSUI_download_completed;
   fn43 = makeName (43);
   download =
@@ -341,7 +341,7 @@ main (int argc, char *argv[])
       break;
   }
 FAILURE:
-  fprintf (stderr, "Cleanup...\n");
+  FPRINTF (stderr, "%s",  "Cleanup...\n");
   if (meta != NULL)
     GNUNET_meta_data_destroy (meta);
   if (ctx != NULL)
index a459c565fcf7cf531c36e0bbf2bc4c7a5308f552..34ac3285e28181097b5dd6ba5062ca4062b68a79 100644 (file)
@@ -151,8 +151,8 @@ testThumbnail ()
                                     EXTRACTOR_OPTION_DEFAULT_POLICY);
   if (ex == NULL)
   {
-    fprintf (stderr,
-             "Test incomplete, have no GTK thumbnail extractor available.\n");
+    FPRINTF (stderr,
+             "Test incomplete, have no GTK thumbnail extractor available.\n", NULL);
     return 0;                   /* can not test, no thumbnailer */
   }
   ex = EXTRACTOR_plugin_add_config (ex, "mime",
index 2b0a9fca8375cf1acea2e3986ba1c0c83244c672..571346f2c672da6f5fce605080c47a0a46ccc0fd 100644 (file)
@@ -35,6 +35,6 @@ main (int argc, char *argv[])
                     "WARNING",
 #endif
                     NULL);
-  fprintf (stderr, "WARNING: testcase not yet written.\n");
+  FPRINTF (stderr, "%s",  "WARNING: testcase not yet written.\n");
   return 0;                     /* testcase passed */
 }
index 870f51a4a1e8d588cd4fe953a993015773876de7..8a847ba2b43153a2eebd873c06fc3eaa335c7220 100644 (file)
@@ -131,7 +131,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
     ret = event->value.publish.cctx;
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     err = 1;
     if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx))
index b1221eb82315c2ee1589a56fc920f7221e3f684a..df9a310b91f2c16c04e8ed102bbe0790278a0b76 100644 (file)
@@ -139,7 +139,7 @@ abort_sks_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  fprintf (stderr, "Operation timed out\n");
+  FPRINTF (stderr, "%s",  "Operation timed out\n");
   kill_task = GNUNET_SCHEDULER_NO_TASK;
   abort_sks_search_task (NULL, tc);
   abort_ksk_search_task (NULL, tc);
@@ -158,7 +158,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
       if (!GNUNET_FS_uri_test_equal
           (sks_expect_uri, event->value.search.specifics.result.uri))
       {
-        fprintf (stderr, "Wrong result for sks search!\n");
+        FPRINTF (stderr, "%s",  "Wrong result for sks search!\n");
         err = 1;
       }
       /* give system 1ms to initiate update search! */
@@ -170,7 +170,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
       if (!GNUNET_FS_uri_test_equal
           (ksk_expect_uri, event->value.search.specifics.result.uri))
       {
-        fprintf (stderr, "Wrong result for ksk search!\n");
+        FPRINTF (stderr, "%s",  "Wrong result for ksk search!\n");
         err = 1;
       }
       GNUNET_SCHEDULER_add_continuation (&abort_ksk_search_task, NULL,
@@ -178,12 +178,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     }
     else
     {
-      fprintf (stderr, "Unexpected search result received!\n");
+      FPRINTF (stderr, "%s",  "Unexpected search result received!\n");
       GNUNET_break (0);
     }
     break;
   case GNUNET_FS_STATUS_SEARCH_ERROR:
-    fprintf (stderr, "Error searching file: %s\n",
+    FPRINTF (stderr, "Error searching file: %s\n",
              event->value.search.specifics.error.message);
     if (sks_search == event->value.search.sc)
       GNUNET_SCHEDULER_add_continuation (&abort_sks_search_task, NULL,
@@ -210,7 +210,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
   case GNUNET_FS_STATUS_SEARCH_STOPPED:
     return NULL;
   default:
-    fprintf (stderr, "Unexpected event: %d\n", event->status);
+    FPRINTF (stderr, "Unexpected event: %d\n", event->status);
     break;
   }
   return event->value.search.cctx;
@@ -227,7 +227,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg)
 
   if (NULL != emsg)
   {
-    fprintf (stderr, "Error publishing: %s\n", emsg);
+    FPRINTF (stderr, "Error publishing: %s\n", emsg);
     err = 1;
     GNUNET_FS_stop (fs);
     return;
@@ -237,7 +237,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg)
   sks_uri = GNUNET_FS_uri_parse (sbuf, &msg);
   if (msg != NULL)
   {
-    fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
+    FPRINTF (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
     err = 1;
     GNUNET_FS_stop (fs);
     GNUNET_free (msg);
@@ -287,7 +287,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
 
   if (NULL != emsg)
   {
-    fprintf (stderr, "Error publishing: %s\n", emsg);
+    FPRINTF (stderr, "Error publishing: %s\n", emsg);
     err = 1;
     GNUNET_FS_stop (fs);
     return;
@@ -336,7 +336,7 @@ testNamespace ()
   GNUNET_FS_namespace_list (fs, &ns_iterator, &ok);
   if (GNUNET_NO == ok)
   {
-    fprintf (stderr, "namespace_list failed to find namespace!\n");
+    FPRINTF (stderr, "%s",  "namespace_list failed to find namespace!\n");
     GNUNET_FS_namespace_delete (ns, GNUNET_YES);
     GNUNET_FS_stop (fs);
     err = 1;
@@ -399,7 +399,7 @@ main (int argc, char *argv[])
   stop_arm (&p1);
   if (GNUNET_YES != update_started)
   {
-    fprintf (stderr, "Update search never started!\n");
+    FPRINTF (stderr, "%s",  "Update search never started!\n");
     err = 1;
   }
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-namespace/");
index 81ec3dd7f2713b3d929412d4e83cd34a24b102a2..051b84f6873722daf646b2eefdd63d8e2d7b2e4c 100644 (file)
@@ -118,12 +118,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
     ret = event->value.publish.cctx;
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     err = 1;
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
     {
-      fprintf (stderr, "Scheduling abort task for error on `%s'\n",
+      FPRINTF (stderr, "Scheduling abort task for error on `%s'\n",
                (const char *) event->value.publish.cctx);
       GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);
index 145ef0ca93be77770eac6ce9f01fd1b76d8d524a..4d569849f0244bfce240455ddb2503a9b0183931 100644 (file)
@@ -184,7 +184,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
     ret = event->value.publish.cctx;
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     err = 1;
     GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL);
index 9d9825e2fb7b61521a219993f7743712add43bc1..ffbcd19debfa1cffa59f12c61df16208f5374edf 100644 (file)
@@ -122,14 +122,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_SEARCH_ERROR:
-    fprintf (stderr, "Error searching file: %s\n",
+    FPRINTF (stderr, "Error searching file: %s\n",
              event->value.search.specifics.error.message);
     GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -161,7 +161,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   default:
-    fprintf (stderr, "Unexpected event: %d\n", event->status);
+    FPRINTF (stderr, "Unexpected event: %d\n", event->status);
     break;
   }
   return NULL;
index 74ba9659ab4df03da8050aba7bb73128d138c482..e511b69104925df81424775b6195f926416d5002 100644 (file)
@@ -170,14 +170,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_SEARCH_ERROR:
-    fprintf (stderr, "Error searching file: %s\n",
+    FPRINTF (stderr, "Error searching file: %s\n",
              event->value.search.specifics.error.message);
     GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -223,7 +223,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     search = NULL;
     break;
   default:
-    fprintf (stderr, "Unexpected event: %d\n", event->status);
+    FPRINTF (stderr, "Unexpected event: %d\n", event->status);
     break;
   }
   return NULL;
index 6da936342e1dd755f3a37a4e3ebc4cf3783f7adb..383447485df9896b89ce3e2fa4bf6cc38aafb7bd 100644 (file)
@@ -189,7 +189,7 @@ main (int argc, char *argv[])
     prog++;
     if (prog == 10000)
     {
-      fprintf (stderr, "Upload failed to complete -- last event: %u\n",
+      FPRINTF (stderr, "Upload failed to complete -- last event: %u\n",
                lastEvent);
     }
     CHECK (prog < 10000);
index 9b21cd651b62d8134b166a0ba6fc8d93d3bdf600..14d93fb5ecc93d90eae91faa620478c4a2bf22e7 100644 (file)
@@ -135,14 +135,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_UNINDEX_ERROR:
-    fprintf (stderr, "Error unindexing file: %s\n",
+    FPRINTF (stderr, "Error unindexing file: %s\n",
              event->value.unindex.specifics.error.message);
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
index 0529aacfa71c2e77ad8a2b94cbb885d9c6c89be6..e5ad9b260d54ce25cf60e21879ea2cafdd1eef11 100644 (file)
@@ -196,14 +196,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     unindex = event->value.unindex.uc;
     return "unindex";
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
-    fprintf (stderr, "Error publishing file: %s\n",
+    FPRINTF (stderr, "Error publishing file: %s\n",
              event->value.publish.specifics.error.message);
     GNUNET_break (0);
     GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
   case GNUNET_FS_STATUS_UNINDEX_ERROR:
-    fprintf (stderr, "Error unindexing file: %s\n",
+    FPRINTF (stderr, "Error unindexing file: %s\n",
              event->value.unindex.specifics.error.message);
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
index 72744351b1b655abe17234e8faa6884448fd4ee1..b7a58ec0f38a08c7a7a7b504646d10d59c8e18ef 100644 (file)
@@ -94,7 +94,7 @@ testLocation ()
   cfg = GNUNET_CONFIGURATION_create ();
   if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, "test_fs_uri_data.conf"))
   {
-    fprintf (stderr, "Failed to parse configuration file\n");
+    FPRINTF (stderr, "%s",  "Failed to parse configuration file\n");
     GNUNET_FS_uri_destroy (baseURI);
     GNUNET_CONFIGURATION_destroy (cfg);
     return 1;
@@ -316,11 +316,11 @@ main (int argc, char *argv[])
   failureCount += testLocation ();
   for (i = 0; i < 255; i++)
   {
-    /* fprintf (stderr, "."); */
+    /* FPRINTF (stderr, "%s",  "."); */
     failureCount += testNamespace (i);
     failureCount += testFile (i);
   }
-  /* fprintf (stderr, "\n"); */
+  /* FPRINTF (stderr, "%s",  "\n"); */
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-uri");
   if (failureCount != 0)
     return 1;
index 91caf103f2f443556a839ece5838306f1d4d37fe..70fadd8d0ba5baca0b7a9bd86827ed017bc5e0f4 100644 (file)
@@ -74,7 +74,7 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     fancy =
         GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
                                         1000LL / del.rel_value);
-    fprintf (stdout, "Download speed was %s/s\n", fancy);
+    FPRINTF (stdout, "Download speed was %s/s\n", fancy);
     GNUNET_free (fancy);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",
                 (unsigned long long) FILESIZE);
@@ -166,7 +166,7 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
   {
-    fprintf (stderr, "Daemons failed to start!\n");
+    FPRINTF (stderr, "%s",  "Daemons failed to start!\n");
     GNUNET_break (0);
     ok = 1;
     return;
index 434dd3ce527b360193e2671fab3bcce53fc1ec64..fb07d34b5bf8326104d549781a00c7aefa8ea829 100644 (file)
@@ -70,7 +70,7 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     fancy =
         GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
                                         1000LL / del.rel_value);
-    fprintf (stdout, "Download speed was %s/s\n", fancy);
+    FPRINTF (stdout, "Download speed was %s/s\n", fancy);
     GNUNET_free (fancy);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",
                 (unsigned long long) FILESIZE);
index eb15668f4555e61d6a981eaee3afbf4315322f4f..c645252ffe094a20003f25f83435d848419de6f5 100644 (file)
@@ -38,7 +38,7 @@ my_addr_gen (void *cls, size_t max, void *buf)
   struct GNUNET_HELLO_Address address;
 
 #if DEBUG
-  fprintf (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i);
+  FPRINTF (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i);
 #endif
   if (0 == *i)
     return 0;
@@ -61,7 +61,7 @@ check_addr (void *cls, const struct GNUNET_HELLO_Address *address,
   unsigned int *i = cls;
 
 #if DEBUG
-  fprintf (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n",
+  FPRINTF (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n",
            *i, address->address_length);
 #endif
   GNUNET_assert (address->address_length > 0);
@@ -82,7 +82,7 @@ remove_some (void *cls, const struct GNUNET_HELLO_Address *address,
   unsigned int *i = cls;
 
 #if DEBUG
-  fprintf (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n",
+  FPRINTF (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n",
            *i, address->address_length);
 #endif
   GNUNET_assert (address->address_length > 0);
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
   startup_time = GNUNET_TIME_absolute_get ();
   memset (&publicKey, 42, sizeof (publicKey));
 #if VERBOSE
-  fprintf (stderr, "Testing HELLO creation (without addresses)...\n");
+  FPRINTF (stderr, "%s",  "Testing HELLO creation (without addresses)...\n");
 #endif
   i = 0;
   msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
@@ -118,14 +118,14 @@ main (int argc, char *argv[])
   GNUNET_assert (0 < GNUNET_HELLO_size (msg1));
 
 #if VERBOSE
-  fprintf (stderr, "Testing address iteration (empty set)...\n");
+  FPRINTF (stderr, "%s",  "Testing address iteration (empty set)...\n");
 #endif
   GNUNET_assert (NULL ==
                  GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr,
                                                  &i));
 
 #if VERBOSE
-  fprintf (stderr, "Testing HELLO creation (with one address)...\n");
+  FPRINTF (stderr, "%s",  "Testing HELLO creation (with one address)...\n");
 #endif
   i = 1;
   msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
@@ -133,7 +133,7 @@ main (int argc, char *argv[])
   GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2));
 
 #if VERBOSE
-  fprintf (stderr, "Testing address iteration (one address)...\n");
+  FPRINTF (stderr, "%s",  "Testing address iteration (one address)...\n");
 #endif
   i = 1;
   GNUNET_assert (NULL ==
@@ -142,14 +142,14 @@ main (int argc, char *argv[])
   GNUNET_assert (i == 0);
 
 #if VERBOSE
-  fprintf (stderr, "Testing get_key from HELLO...\n");
+  FPRINTF (stderr, "%s",  "Testing get_key from HELLO...\n");
 #endif
   GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk));
   GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk)));
   GNUNET_free (msg1);
 
 #if VERBOSE
-  fprintf (stderr, "Testing HELLO creation (with two addresses)...\n");
+  FPRINTF (stderr, "%s",  "Testing HELLO creation (with two addresses)...\n");
 #endif
   i = 2;
   msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
   GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3));
 
 #if VERBOSE
-  fprintf (stderr, "Testing address iteration (two addresses)...\n");
+  FPRINTF (stderr, "%s",  "Testing address iteration (two addresses)...\n");
 #endif
   i = 3;
   GNUNET_assert (NULL ==
@@ -166,7 +166,7 @@ main (int argc, char *argv[])
   GNUNET_assert (i == 0);
 
 #if VERBOSE
-  fprintf (stderr, "Testing HELLO merge...\n");
+  FPRINTF (stderr, "%s",  "Testing HELLO merge...\n");
 #endif
   msg1 = GNUNET_HELLO_merge (msg2, msg3);
   GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3));
@@ -179,7 +179,7 @@ main (int argc, char *argv[])
   GNUNET_free (msg1);
 
 #if VERBOSE
-  fprintf (stderr, "Testing address iteration to copy HELLO...\n");
+  FPRINTF (stderr, "%s",  "Testing address iteration to copy HELLO...\n");
 #endif
   i = 2;
   msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i);
@@ -193,7 +193,7 @@ main (int argc, char *argv[])
   GNUNET_free (msg1);
 
 #if VERBOSE
-  fprintf (stderr, "Testing delta address iteration...\n");
+  FPRINTF (stderr, "%s",  "Testing delta address iteration...\n");
 #endif
   i = 2;
   GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr,
index 5dce8df1083b5a93934ac44361847e64c0fff130..92cd7fcc593efb073447fe4d1a025b29080869bf 100644 (file)
@@ -113,7 +113,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (peer == NULL)
     return;
 #if VERBOSE
-  fprintf (stderr, "Peer %s connected\n", GNUNET_i2s (peer));
+  FPRINTF (stderr, "Peer %s connected\n", GNUNET_i2s (peer));
 #endif
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n");
   ok = 0;
@@ -252,10 +252,10 @@ main (int argc, char *argv[])
   ret = check ();
   if (ret == 0)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     /* now do it again */
     ret = check ();
-    fprintf (stderr, ".\n");
+    FPRINTF (stderr, "%s",  ".\n");
   }
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1");
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
index a7577e36f8b14b810aed41975cf8b7a470234594..445b7100d171b2cb2fa95206f2338e9670dd464e 100644 (file)
@@ -344,25 +344,25 @@ tree_node_debug (struct MeshTunnelTreeNode *n, uint16_t level)
   uint16_t i;
 
   for (i = 0; i < level; i++)
-    fprintf (stderr, "  ");
+    FPRINTF (stderr, "%s",  "  ");
   if (n->status == MESH_PEER_READY)
-    fprintf (stderr, "#");
+    FPRINTF (stderr, "%s",  "#");
   if (n->status == MESH_PEER_SEARCHING)
-    fprintf (stderr, "+");
+    FPRINTF (stderr, "%s",  "+");
   if (n->status == MESH_PEER_RELAY)
-    fprintf (stderr, "-");
+    FPRINTF (stderr, "%s",  "-");
   if (n->status == MESH_PEER_RECONNECTING)
-    fprintf (stderr, "*");
+    FPRINTF (stderr, "%s",  "*");
 
   GNUNET_PEER_resolve (n->peer, &id);
-  fprintf (stderr, "%s, [%u, %p] ", GNUNET_i2s (&id), n->peer, n);
+  FPRINTF (stderr, "%s, [%u, %p] ", GNUNET_i2s (&id), n->peer, n);
   if (NULL != n->parent)
   {
     GNUNET_PEER_resolve (n->parent->peer, &id);
-    fprintf (stderr, "(-> %s [%u])\n", GNUNET_i2s (&id), n->parent->peer);
+    FPRINTF (stderr, "(-> %s [%u])\n", GNUNET_i2s (&id), n->parent->peer);
   }
   else
-    fprintf (stderr, "(root)\n");
+    FPRINTF (stderr, "%s",  "(root)\n");
   for (c = n->children_head; NULL != c; c = c->next)
     tree_node_debug (c, level + 1);
 }
index 4b7e31ef86fd1ee7aff730264d0bb16ce4709d97..0336ecc9d874460902ea95411e8c5fc8ebc9c1a3 100644 (file)
@@ -284,7 +284,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   if ((args[0] == NULL) || (1 != SSCANF (args[0], "%u", &port)) || (0 == port)
       || (65536 <= port))
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              _
              ("Please pass valid port number as the first argument! (got `%s')\n"),
              args[0]);
index 801063b23dbf3be08bea5b5bdb3df7bc14f2efac..43743c47bef3271a68b43950ba7de277412af642 100644 (file)
@@ -199,7 +199,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct NSEPeer *pos;
 
 #if VERBOSE
-  fprintf (stderr, "Ending test.\n");
+  FPRINTF (stderr, "%s",  "Ending test.\n");
 #endif
 
   if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
@@ -252,7 +252,7 @@ handle_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp,
     GNUNET_free (output_buffer);
   }
   else
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Received network size estimate from peer %s. Size: %f std.dev. %f\n",
              GNUNET_i2s (&peer->daemon->id), estimate, std_dev);
 
index a2f73aaf4e3343af7c8b588e8bf10771879fdd69..7e0ab0bbc25ad6d8df46aca45e2ecf2986294ea6 100644 (file)
@@ -93,7 +93,7 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp,
 {
   int *ok = cls;
 
-  fprintf (stderr,
+  FPRINTF (stderr,
            "Received NSE message, estimate %f, standard deviation %f.\n",
            estimate, std_dev);
   /* Fantastic check below. Expect NaN, the only thing not equal to itself. */
@@ -162,7 +162,7 @@ check ()
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping arm.\n");
   stop_arm (&p1);
   if (0 != ok)
-    fprintf (stderr, "No information received from NSE service!\n");
+    FPRINTF (stderr, "%s",  "No information received from NSE service!\n");
   return ok;
 }
 
index 435cdabf46c113ca1ea3d40e92a35c99d2e06887..4cd5e4349ef7b5589834a3824f1e594ab18cd11e 100644 (file)
@@ -93,7 +93,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct NSEPeer *pos;
 
 #if VERBOSE
-  fprintf (stderr, "Ending test.\n");
+  FPRINTF (stderr, "%s",  "Ending test.\n");
 #endif
 
   while (NULL != (pos = peer_head))
@@ -122,7 +122,7 @@ handle_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp,
 {
   struct NSEPeer *peer = cls;
 
-  fprintf (stderr,
+  FPRINTF (stderr,
            "Received network size estimate from peer %s. logSize: %f std.dev. %f (%f/%u)\n",
            GNUNET_i2s (&peer->daemon->id), estimate, std_dev,
            GNUNET_NSE_log_estimate_to_n (estimate), num_peers);
@@ -136,7 +136,7 @@ connect_nse_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   unsigned int i;
 
 #if VERBOSE
-  fprintf (stderr, "TEST_NSE_MULTIPEER: connecting to nse service of peers\n");
+  FPRINTF (stderr, "%s",  "TEST_NSE_MULTIPEER: connecting to nse service of peers\n");
 #endif
   for (i = 0; i < num_peers; i++)
   {
index 337a9b2abeede7dd9260950946385721bca65a35..21c996661077d6e688da8f63e5d6cf1367aa8a9c 100644 (file)
@@ -148,7 +148,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (peer == NULL)
   {
     if (err_msg != NULL)
-      fprintf (stderr, _("Error in communication with PEERINFO service\n"));
+      FPRINTF (stderr, "%s",  _("Error in communication with PEERINFO service\n"));
     GNUNET_PEERINFO_disconnect (peerinfo);
     return;
   }
@@ -191,7 +191,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   cfg = c;
   if (args[0] != NULL)
   {
-    fprintf (stderr, _("Invalid command line argument `%s'\n"), args[0]);
+    FPRINTF (stderr, _("Invalid command line argument `%s'\n"), args[0]);
     return;
   }
   if (get_self != GNUNET_YES)
@@ -199,7 +199,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     peerinfo = GNUNET_PEERINFO_connect (cfg);
     if (peerinfo == NULL)
     {
-      fprintf (stderr, _("Could not access PEERINFO service.  Exiting.\n"));
+      FPRINTF (stderr, "%s",  _("Could not access PEERINFO service.  Exiting.\n"));
       return;
     }
     GNUNET_PEERINFO_iterate (peerinfo, NULL,
@@ -213,14 +213,14 @@ run (void *cls, char *const *args, const char *cfgfile,
         GNUNET_CONFIGURATION_get_value_filename (cfg, "GNUNETD", "HOSTKEY",
                                                  &fn))
     {
-      fprintf (stderr, _("Could not find option `%s:%s' in configuration.\n"),
+      FPRINTF (stderr, _("Could not find option `%s:%s' in configuration.\n"),
                "GNUNETD", "HOSTKEYFILE");
       return;
     }
     priv = GNUNET_CRYPTO_rsa_key_create_from_file (fn);
     if (priv == NULL)
     {
-      fprintf (stderr, _("Loading hostkey from `%s' failed.\n"), fn);
+      FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn);
       GNUNET_free (fn);
       return;
     }
index 38bbb828f2f1be403b73fa461ebffadb8925f1cf..e69b487d5e01b8ecc68877d9719caf1c640fb885 100755 (executable)
@@ -56,7 +56,7 @@ check_it (void *cls, const struct GNUNET_HELLO_Address *address,
 #if DEBUG
   if (addrlen > 0)
   {
-    fprintf (stderr, "name: %s, addr: %s\n", tname, (const char *) addr);
+    FPRINTF (stderr, "name: %s, addr: %s\n", tname, (const char *) addr);
   }
 #endif
   return GNUNET_OK;
@@ -110,13 +110,13 @@ process (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (peer == NULL)
   {
 #if DEBUG
-    fprintf (stderr, "Process received NULL response\n");
+    FPRINTF (stderr, "Process received NULL response\n");
 #endif
   }
   else
   {
 #if DEBUG
-    fprintf (stderr, "Processed a peer\n");
+    FPRINTF (stderr, "Processed a peer\n");
 #endif
     numpeers++;
     if (0 && (hello != NULL))
@@ -179,7 +179,7 @@ check ()
   GNUNET_assert (NULL != proc);
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
                       "perf-peerinfo-api", "nohelp", options, &run, &ok);
-  fprintf (stderr, "Received %u/%u calls before timeout\n", numpeers,
+  FPRINTF (stderr, "Received %u/%u calls before timeout\n", numpeers,
            NUM_REQUESTS * NUM_REQUESTS / 2);
   GAUGER ("PEERINFO", "Peerinfo lookups", numpeers / 30, "peers/s");
 #if START_SERVICE
index 0f2c92582678e50fc69a863883dba7d0fee7bfaa..7fe78161c682e5c637fd891db40b930a08b5ca80 100644 (file)
@@ -95,7 +95,7 @@ cleanup (void *cls, int success)
 
   if (success != GNUNET_OK)
   {
-    fprintf (stderr, _("Failed to obtain statistics.\n"));
+    FPRINTF (stderr, _("Failed to obtain statistics.\n"),NULL);
     ret = 1;
   }
   if (h != NULL)
index e966ca1370b8e8b45369193270cce4ebe39419fc..2bca7b3b95dbe8e3ff49b2ba833d4f091b3a2699 100644 (file)
@@ -245,7 +245,7 @@ finish_testing ()
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 
@@ -290,19 +290,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
   {
     if (outfile != NULL)
     {
-      fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
-      fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second));
+      FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
+      FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second));
     }
     topology_connections++;
   }
   else
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Finished iterating over topology, %d total connections!\n",
              topology_connections);
     if (outfile != NULL)
     {
-      fprintf (outfile, "}\n");
+      FPRINTF (outfile, "%s",  "}\n");
       fclose (outfile);
       GNUNET_SCHEDULER_add_now (&finish_testing, NULL);
     }
@@ -326,16 +326,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
   if ((total_messages_received) % modnum == 0)
   {
     if (total_messages_received == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) total_messages_received / expected_messages) *
                       100));
 
   }
   else if (total_messages_received % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -354,7 +354,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (total_messages_received == expected_messages)
   {
 #if VERBOSE
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
     GNUNET_SCHEDULER_cancel (die_task);
     GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
@@ -362,7 +362,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
     GNUNET_free (dotOutFileNameFinished);
     if (dotOutFileFinished != NULL)
     {
-      fprintf (dotOutFileFinished, "strict graph G {\n");
+      FPRINTF (dotOutFileFinished, "%s",  "strict graph G {\n");
     }
     topology_connections = 0;
     GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished);
@@ -424,7 +424,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 }
@@ -639,16 +639,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     if ((total_connections) % modnum == 0)
     {
       if (total_connections == 0)
-        fprintf (stdout, "0%%");
+        FPRINTF (stdout, "%s",  "0%%");
       else
-        fprintf (stdout, "%d%%",
+        FPRINTF (stdout, "%d%%",
                  (int) (((float) total_connections / expected_connections) *
                         100));
 
     }
     else if (total_connections % dotnum == 0)
     {
-      fprintf (stdout, ".");
+      FPRINTF (stdout, "%s",  ".");
     }
     fflush (stdout);
 #endif
@@ -667,7 +667,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
 
     expected_messages++;
     if (dotOutFile != NULL)
-      fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
                second_daemon->shortname);
   }
 #if VERBOSE
@@ -683,7 +683,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
   if (total_connections == expected_connections)
   {
 #if VERBOSE
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -695,7 +695,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_NO_TASK;
 #if DELAY_FOR_LOGGING
-    fprintf (stdout, "Sending test messages in 10 seconds.\n");
+    FPRINTF (stdout, "%s",  "Sending test messages in 10 seconds.\n");
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
                                   (GNUNET_TIME_UNIT_SECONDS, 10),
                                   &send_test_messages, test_messages);
@@ -709,7 +709,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
                                   test_messages);
 #endif
 #if VERBOSE
-    fprintf (stdout, "Test message progress: [");
+    FPRINTF (stdout, "%s",  "Test message progress: [");
 #endif
 
   }
@@ -784,7 +784,7 @@ connect_topology ()
   modnum = expected_connections / 4;
   dotnum = (expected_connections / 50) + 1;
 #if VERBOSE
-  fprintf (stdout, "Peer connection progress: [");
+  FPRINTF (stdout, "%s",  "Peer connection progress: [");
 #endif
 }
 
@@ -798,7 +798,7 @@ create_topology ()
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Topology set up, now starting peers!\n");
-    fprintf (stdout, "Daemon start progress [");
+    FPRINTF (stdout, "%s",  "Daemon start progress [");
 #endif
     GNUNET_TESTING_daemons_continue_startup (pg);
   }
@@ -836,15 +836,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if ((num_peers - peers_left) % modnum == 0)
   {
     if (num_peers - peers_left == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) (num_peers - peers_left) / num_peers) * 100));
 
   }
   else if ((num_peers - peers_left) % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -852,7 +852,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if (peers_left == 0)
   {
 #if VERBOSE
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -865,7 +865,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
         GNUNET_SCHEDULER_add_delayed (timeout, &end_badly,
                                       "from peers_started_callback");
 #if DELAY_FOR_LOGGING
-    fprintf (stdout, "Connecting topology in 10 seconds\n");
+    FPRINTF (stdout, "%s",  "Connecting topology in 10 seconds\n");
     gather_log_data ();
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
                                   (GNUNET_TIME_UNIT_SECONDS, 10),
@@ -905,15 +905,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if ((num_peers - peers_left) % modnum == 0)
   {
     if (num_peers - peers_left == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) (num_peers - peers_left) / num_peers) * 100));
 
   }
   else if ((num_peers - peers_left) % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -921,7 +921,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if (peers_left == 0)
   {
 #if VERBOSE
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All %d hostkeys created, now creating topology!\n", num_peers);
 #endif
@@ -952,7 +952,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   dotOutFile = fopen (dotOutFileName, "w");
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "strict graph G {\n");
+    FPRINTF (dotOutFile, "%s",  "strict graph G {\n");
   }
 
 #if VERBOSE
@@ -1101,7 +1101,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   modnum = num_peers / 4;
   dotnum = (num_peers / 50) + 1;
 #if VERBOSE
-  fprintf (stdout, "Hostkey generation progress: [");
+  FPRINTF (stdout, "%s",  "Hostkey generation progress: [");
 #endif
   /* Set up a task to end testing if peer start fails */
   die_task =
index 20c628c6aa6eba5fee44f83f3b0a539a5b7d6225..bcee38659f29de61aa16f187dbf2e3192ad6b1fa 100644 (file)
@@ -72,11 +72,11 @@ end2_cb (void *cls, const char *emsg)
   {
     if (phase < NUM_PHASES)
     {
-      fprintf (stderr, ".");
+      FPRINTF (stderr, "%s",  ".");
       run_phase ();
       return;
     }
-    fprintf (stderr, ".\n");
+    FPRINTF (stderr, "%s",  ".\n");
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Both daemons terminated, will now exit.\n");
@@ -129,8 +129,8 @@ my_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first,
 {
   cc = NULL;
 #if VERBOSE
-  fprintf (stderr, "Peer %s ", GNUNET_i2s (first));
-  fprintf (stderr, "connected to %s\n", GNUNET_i2s (second));
+  FPRINTF (stderr, "Peer %s ", GNUNET_i2s (first));
+  FPRINTF (stderr, "connected to %s\n", GNUNET_i2s (second));
 #endif
   GNUNET_SCHEDULER_add_now (&finish_testing, NULL);
 }
index 7d0c0da5fe86c4849b3aee0bd8cd7107df889dec..17f3be89a13da0ace5c3135a39940dafc5b1ba4c 100644 (file)
@@ -253,8 +253,8 @@ finish_testing ()
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
-    fclose (dotOutFile);
+    FPRINTF (dotOutFile, "%s",  "}");
+    FCLOSE (dotOutFile);
   }
 
   ok = 0;
@@ -326,19 +326,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
   {
     if (outfile != NULL)
     {
-      fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
-      fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second));
+      FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
+      FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second));
     }
     topology_connections++;
   }
   else
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Finished iterating over topology, %d total connections!\n",
              topology_connections);
     if (outfile != NULL)
     {
-      fprintf (outfile, "}\n");
+      FPRINTF (outfile, "%s",  "}\n");
       fclose (outfile);
 #if DO_STATS
       GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL);
@@ -366,16 +366,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
   if ((total_messages_received) % modnum == 0)
   {
     if (total_messages_received == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) total_messages_received / expected_messages) *
                       100));
 
   }
   else if (total_messages_received % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -394,7 +394,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (total_messages_received == expected_messages)
   {
 #if PROGRESS_BARS
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
     GNUNET_SCHEDULER_cancel (die_task);
     GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
@@ -402,7 +402,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
     GNUNET_free (dotOutFileNameFinished);
     if (dotOutFileFinished != NULL)
     {
-      fprintf (dotOutFileFinished, "strict graph G {\n");
+      FPRINTF (dotOutFileFinished, "%s",  "strict graph G {\n");
     }
     topology_connections = 0;
     GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished);
@@ -464,7 +464,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 }
@@ -680,16 +680,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     if ((total_connections) % modnum == 0)
     {
       if (total_connections == 0)
-        fprintf (stdout, "0%%");
+        FPRINTF (stdout, "%s",  "0%%");
       else
-        fprintf (stdout, "%d%%",
+        FPRINTF (stdout, "%d%%",
                  (int) (((float) total_connections / expected_connections) *
                         100));
 
     }
     else if (total_connections % dotnum == 0)
     {
-      fprintf (stdout, ".");
+      FPRINTF (stdout, "%s",  ".");
     }
     fflush (stdout);
 #endif
@@ -708,7 +708,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
 
     expected_messages++;
     if (dotOutFile != NULL)
-      fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
                second_daemon->shortname);
   }
 #if VERBOSE
@@ -724,7 +724,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
   if (total_connections == expected_connections)
   {
 #if PROGRESS_BARS
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -740,7 +740,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_NO_TASK;
 #if DELAY_FOR_LOGGING
-    fprintf (stdout, "Sending test messages in 10 seconds.\n");
+    FPRINTF (stdout, "%s",  "Sending test messages in 10 seconds.\n");
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
                                   (GNUNET_TIME_UNIT_SECONDS, 10),
                                   &send_test_messages, test_messages);
@@ -754,7 +754,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
                                   test_messages);
 #endif
 #if PROGRESS_BARS
-    fprintf (stdout, "Test message progress: [");
+    FPRINTF (stdout, "%s",  "Test message progress: [");
 #endif
 
   }
@@ -837,7 +837,7 @@ connect_topology ()
   if (dotnum == 0)
     dotnum = 1;
 #if PROGRESS_BARS
-  fprintf (stdout, "Peer connection progress: [");
+  FPRINTF (stdout, "%s",  "Peer connection progress: [");
 #endif
 }
 
@@ -851,7 +851,7 @@ create_topology ()
 #if PROGRESS_BARS
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Topology set up, now starting peers!\n");
-    fprintf (stdout, "Daemon start progress [");
+    FPRINTF (stdout, "%s",  "Daemon start progress [");
 #endif
     GNUNET_TESTING_daemons_continue_startup (pg);
   }
@@ -892,15 +892,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if ((num_peers - peers_left) % modnum == 0)
   {
     if (num_peers - peers_left == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) (num_peers - peers_left) / num_peers) * 100));
 
   }
   else if ((num_peers - peers_left) % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -908,7 +908,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if (peers_left == 0)
   {
 #if PROGRESS_BARS
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
 #endif
 #if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -922,7 +922,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
                                       (GNUNET_TIME_UNIT_MINUTES, 8), &end_badly,
                                       "from peers_started_callback");
 #if DELAY_FOR_LOGGING
-    fprintf (stdout, "Connecting topology in 10 seconds\n");
+    FPRINTF (stdout, "%s",  "Connecting topology in 10 seconds\n");
     gather_log_data ();
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
                                   (GNUNET_TIME_UNIT_SECONDS, 10),
@@ -962,15 +962,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if ((num_peers - peers_left) % modnum == 0)
   {
     if (num_peers - peers_left == 0)
-      fprintf (stdout, "0%%");
+      FPRINTF (stdout, "%s",  "0%%");
     else
-      fprintf (stdout, "%d%%",
+      FPRINTF (stdout, "%d%%",
                (int) (((float) (num_peers - peers_left) / num_peers) * 100));
 
   }
   else if ((num_peers - peers_left) % dotnum == 0)
   {
-    fprintf (stdout, ".");
+    FPRINTF (stdout, "%s",  ".");
   }
   fflush (stdout);
 #endif
@@ -978,7 +978,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
   if (peers_left == 0)
   {
 #if PROGRESS_BARS
-    fprintf (stdout, "100%%]\n");
+    FPRINTF (stdout, "%s",  "100%%]\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All %d hostkeys created, now creating topology!\n", num_peers);
 #endif
@@ -1009,7 +1009,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   dotOutFile = fopen (dotOutFileName, "w");
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "strict graph G {\n");
+    FPRINTF (dotOutFile, "%s",  "strict graph G {\n");
   }
 
 #if VERBOSE
@@ -1156,7 +1156,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   if (dotnum == 0)
     dotnum = 1;
 #if PROGRESS_BARS
-  fprintf (stdout, "Hostkey generation progress: [");
+  FPRINTF (stdout, "%s",  "Hostkey generation progress: [");
 #endif
   /* Set up a task to end testing if peer start fails */
   die_task =
index 095c5b2a2330fb204a8de37a4103ef6d38ad2bf6..9ff1fcbaaac859c19d5fe3b2c850ee65776da4e3 100644 (file)
@@ -142,7 +142,7 @@ finish_testing ()
 #endif
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 
@@ -167,7 +167,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "}");
+    FPRINTF (dotOutFile, "%s",  "}");
     fclose (dotOutFile);
   }
 }
@@ -191,7 +191,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
                 first_daemon->shortname, second_daemon->shortname);
 #endif
     if (dotOutFile != NULL)
-      fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
+      FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
                second_daemon->shortname);
   }
 
@@ -399,7 +399,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   dotOutFile = fopen (dotOutFileName, "w");
   if (dotOutFile != NULL)
   {
-    fprintf (dotOutFile, "strict graph G {\n");
+    FPRINTF (dotOutFile, "%s",  "strict graph G {\n");
   }
 
 #if VERBOSE
index f56c51381b6518350237a8c371b5857723345b56..4f67179c1a19ba4fd1958c15881c1329532e1189 100644 (file)
@@ -1115,17 +1115,17 @@ update_meter (struct ProgressMeter *meter)
     {
       if (meter->completed == 0)
       {
-        fprintf (stdout, "%sProgress: [0%%", meter->startup_string);
+        FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string);
       }
       else
-        fprintf (stdout, "%d%%",
+        FPRINTF (stdout, "%d%%",
                  (int) (((float) meter->completed / meter->total) * 100));
     }
     else if (meter->completed % meter->dotnum == 0)
-      fprintf (stdout, ".");
+      FPRINTF (stdout, "%s",  ".");
 
     if (meter->completed + 1 == meter->total)
-      fprintf (stdout, "%d%%]\n", 100);
+      FPRINTF (stdout, "%d%%]\n", 100);
     fflush (stdout);
   }
   meter->completed++;
@@ -2810,7 +2810,7 @@ friend_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
 
   temppeer = &peer->id;
   GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc);
-  fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc);
+  FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc);
 
   return GNUNET_YES;
 }
@@ -2849,7 +2849,7 @@ blacklist_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
   GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing entry %s:%s to file\n",
               blacklist_ctx->transport, (char *) &peer_enc);
-  fprintf (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport,
+  FPRINTF (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport,
            (char *) &peer_enc);
 
   return GNUNET_YES;
@@ -2899,7 +2899,7 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg)
     {
       GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
                                  id.hashPubKey, &peer_enc);
-      fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc);
+      FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc);
       conn_iter = conn_iter->next;
     }
 #else
@@ -3086,7 +3086,7 @@ create_and_copy_blacklist_files (struct GNUNET_TESTING_PeerGroup *pg,
         {
           GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
                                      id.hashPubKey, &peer_enc);
-          fprintf (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc);
+          FPRINTF (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc);
           conn_iter = conn_iter->next;
         }
 #else
index bf69a7fc8aac996467445fb8875b3280f9a1cdcc..a34cb5abe243ad6dbabafd57740af08f8b9e3b47 100644 (file)
@@ -210,17 +210,17 @@ update_meter (struct ProgressMeter *meter)
     {
       if (meter->completed == 0)
       {
-        fprintf (stdout, "%sProgress: [0%%", meter->startup_string);
+        FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string);
       }
       else
-        fprintf (stdout, "%d%%",
+        FPRINTF (stdout, "%d%%",
                  (int) (((float) meter->completed / meter->total) * 100));
     }
     else if (meter->completed % meter->dotnum == 0)
-      fprintf (stdout, ".");
+      FPRINTF (stdout, "%s",  ".");
 
     if (meter->completed + 1 == meter->total)
-      fprintf (stdout, "%d%%]\n", 100);
+      FPRINTF (stdout, "%d%%]\n", 100);
     fflush (stdout);
   }
   meter->completed++;
index 9d8f1633d33416b5b69671873a7a6b25ac0762ed..65a313d44ef45969974885a5e0c5f840cb2e34e1 100644 (file)
@@ -110,7 +110,7 @@ notify_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first,
   *cc = NULL;
   if (NULL != emsg)
   {
-    fprintf (stderr, "Failed to connect two peers: %s\n", emsg);
+    FPRINTF (stderr, "Failed to connect two peers: %s\n", emsg);
     for (i = 0; i < NUM_PEERS; i++)
       if (NULL != cc[i])
       {
index 172f34b271d0d7e2288451bc460708919cf19b19..8ba81891fca31e5ef682a588119936acb1d94546 100644 (file)
@@ -73,7 +73,7 @@ char *cfg_file_p1;
 char *cfg_file_p2;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -368,7 +368,7 @@ main (int argc, char *argv[])
 
   if (argc < 3)
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              "usage gnunet-transport-connect-running-peers <cfg_peer1> <cfg_peer2>\n");
     return -1;
   }
index 02a5ee492e6da3fcc03d9b0953c7f909826e6720..17a21dd28d2a918d3534cc97c9e1515c97b90805 100644 (file)
@@ -167,11 +167,11 @@ display_test_result (struct TestContext *tc, int result)
 {
   if (GNUNET_YES != result)
   {
-    fprintf (stderr, "Configuration for plugin `%s' did not work!\n", tc->name);
+    FPRINTF (stderr, "Configuration for plugin `%s' did not work!\n", tc->name);
   }
   else
   {
-    fprintf (stderr, "Configuration for plugin `%s' is working!\n", tc->name);
+    FPRINTF (stderr, "Configuration for plugin `%s' is working!\n", tc->name);
   }
   if (GNUNET_SCHEDULER_NO_TASK != tc->tsk)
   {
@@ -245,9 +245,9 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg)
       GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins",
                                              &plugins))
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              _
-             ("No transport plugins configured, peer will never communicate\n"));
+             ("No transport plugins configured, peer will never communicate\n"), NULL);
     ret = 4;
     return;
   }
@@ -259,7 +259,7 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg)
     if (GNUNET_OK !=
         GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port))
     {
-      fprintf (stderr,
+      FPRINTF (stderr,
                _("No port configured for plugin `%s', cannot test it\n"), tok);
       continue;
     }
@@ -310,14 +310,14 @@ do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (benchmark_receive)
   {
     duration = GNUNET_TIME_absolute_get_duration (start_time);
-    fprintf (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"),
+    FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"),
              1000 * traffic_received / (1 + duration.rel_value),
              traffic_received, (unsigned long long) duration.rel_value);
   }
   if (benchmark_send)
   {
     duration = GNUNET_TIME_absolute_get_duration (start_time);
-    fprintf (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"),
+    FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"),
              1000 * traffic_sent / (1 + duration.rel_value), traffic_sent,
              (unsigned long long) duration.rel_value);
   }
@@ -350,7 +350,7 @@ transmit_data (void *cls, size_t size, void *buf)
                                                GNUNET_TIME_UNIT_FOREVER_REL,
                                                &transmit_data, NULL);
   if (verbosity > 0)
-    fprintf (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size,
+    FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size,
              GNUNET_i2s (&pid));
   return size;
 }
@@ -370,7 +370,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
 {
   if (verbosity > 0)
-    fprintf (stdout, _("Connected to %s\n"), GNUNET_i2s (peer));
+    FPRINTF (stdout, _("Connected to %s\n"), GNUNET_i2s (peer));
   if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity)))
     return;
   ret = 0;
@@ -401,7 +401,7 @@ static void
 notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   if (verbosity > 0)
-    fprintf (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer));
+    FPRINTF (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer));
   if ((0 == memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) &&
       (NULL != th))
   {
@@ -430,7 +430,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   if (!benchmark_receive)
     return;
   if (verbosity > 0)
-    fprintf (stdout, _("Received %u bytes from %s\n"),
+    FPRINTF (stdout, _("Received %u bytes from %s\n"),
              (unsigned int) ntohs (message->size), GNUNET_i2s (peer));
   if (traffic_received == 0)
     start_time = GNUNET_TIME_absolute_get ();
@@ -444,7 +444,7 @@ process_string (void *cls, const char *address)
 
   if ((address != NULL))
   {
-    fprintf (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address);
+    FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address);
   }
   else
   {
@@ -499,7 +499,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
   if (benchmark_send && (NULL == cpid))
   {
-    fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
+    FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
              "-s", "-C");
     return;
   }
@@ -508,7 +508,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     ret = 1;
     if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey))
     {
-      fprintf (stderr, _("Failed to parse peer identity `%s'\n"), cpid);
+      FPRINTF (stderr, _("Failed to parse peer identity `%s'\n"), cpid);
       return;
     }
     handle =
index 5d9cfff1930f98884add51ccad0e093440784551..0ef708b6219ec6746c2633055e15d0b7dc3873a2 100644 (file)
@@ -130,7 +130,7 @@ static struct GNUNET_TIME_Absolute start_time;
  */
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -147,7 +147,7 @@ end ()
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
   datarate = (total_bytes_sent * 1000) / delta;
 
-  fprintf (stderr, "Throughput was %llu b/s\n", datarate);
+  FPRINTF (stderr, "Throughput was %llu b/s\n", datarate);
 
   test_failed = GNUNET_NO;
   if (datarate > quota_in_p2)
@@ -365,7 +365,7 @@ notify_ready (void *cls, size_t size, void *buf)
   total_bytes_sent += ret;
   if (n == TOTAL_MSGS)
   {
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n");
   }
   return ret;
@@ -417,12 +417,12 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   counter++;
   if ((DURATION.rel_value / 1000) < counter)
   {
-    fprintf (stderr, ".\n");
+    FPRINTF (stderr, "%s",  ".\n");
     GNUNET_SCHEDULER_add_now (&end, NULL);
   }
   else
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     measure_task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &measure, NULL);
   }
index dd0704231d0ffd107d3eaba943c9dd3ad5bdff18..1058f2b6b3096f372ab33e33a0d3025406c208d3 100644 (file)
@@ -81,7 +81,7 @@ char *cfg_file_p1;
 char *cfg_file_p2;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index 20005deab7c02700dbc70836eeb1f58ec250d6fe..b4a3ca41d173f215cd52617ae580a3b4636cca17 100644 (file)
@@ -80,7 +80,7 @@ char *cfg_file_p1;
 char *cfg_file_p2;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index 026ed085a960238b14dce9dca8f008207a015c47..1a73bcb5fce2b05f5034ef126b59173df78d3968 100644 (file)
@@ -80,7 +80,7 @@ char *cfg_file_p1;
 char *cfg_file_p2;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index 7fb13e261cbb6a9e79550d929c01e3d4737857be..d1aa6e40da7d8e9e572ee103c7db65b97dd4f203 100644 (file)
@@ -84,7 +84,7 @@ char *cfg_file_p1;
 char *cfg_file_p2;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index ac360a3ea15f5d74a0803ba851da8631094fed22..eb03564d5bad94c3beab11e67af53cd8438398ea 100644 (file)
@@ -123,7 +123,7 @@ static struct GNUNET_TIME_Absolute start_time;
  */
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -139,7 +139,7 @@ end ()
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  fprintf (stderr, "\nThroughput was %llu kb/s\n",
+  FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
            total_bytes * 1000 / 1024 / delta);
   GNUNET_asprintf (&value_name, "reliable_%s", test_plugin);
   GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
@@ -267,7 +267,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   n++;
   if (0 == (n % (TOTAL_MSGS / 100)))
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (die_task != GNUNET_SCHEDULER_NO_TASK)
       GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
@@ -353,7 +353,7 @@ notify_ready (void *cls, size_t size, void *buf)
   total_bytes += ret;
   if (n == TOTAL_MSGS)
   {
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n");
   }
   return ret;
index 61423a7ee7f69b2929c4aadfff8d981e76361966..22c60356514348b5b881e38d02669053d5ebe11a 100644 (file)
@@ -80,7 +80,7 @@ char *cfg_file_p2;
 static int restarted;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index 67cc90f0e21c5c912567fd7dbb475c2ca6016b01..3de91d62acc7b6a3b2ad8e52f688bae23949fef0 100644 (file)
@@ -80,7 +80,7 @@ char *cfg_file_p2;
 static int restarted;
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
index 29f7dd4af39832bfda970052fb915f079a221210..35279ff765d734db1a94039b1be99ca3225efc8b 100644 (file)
@@ -87,7 +87,7 @@ static int disconnects;
 
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -210,13 +210,13 @@ timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (time_running.rel_value ==
       GNUNET_TIME_relative_max (time_running, WAIT).rel_value)
   {
-    fprintf (stderr, "100%%\n");
+    FPRINTF (stderr, "%s",  "100%%\n");
     shutdown_flag = GNUNET_YES;
     GNUNET_SCHEDULER_add_now (&end, NULL);
   }
   else
   {
-    fprintf (stderr, "%u%%..", percentage);
+    FPRINTF (stderr, "%u%%..", percentage);
     timer_task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide (WAIT, 10),
                                       &timer, NULL);
index 2120f704464cece8a73d8d717fa878247dd4f769..413daabc9bc495c3df9bd6a2bb756db582fdfc60 100644 (file)
@@ -126,7 +126,7 @@ static GNUNET_TRANSPORT_TESTING_ConnectRequest cc;
  */
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -144,7 +144,7 @@ end ()
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  fprintf (stderr, "\nThroughput was %llu kb/s\n",
+  FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
            total_bytes * 1000 / 1024 / delta);
   GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin);
   GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
@@ -337,7 +337,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   test_sending = GNUNET_YES;
   if (0 == (n % (TOTAL_MSGS / 100)))
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
       GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
@@ -410,7 +410,7 @@ notify_ready (void *cls, size_t size, void *buf)
   }
   else
   {
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages scheduled to be sent\n");
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
       GNUNET_SCHEDULER_cancel (die_task);
index 3770ebfdb8ed69e4db79bcd4af3cf1349919c943..52bf638337759b07325c8cd226ec37254df3d3db 100644 (file)
@@ -124,7 +124,7 @@ static struct GNUNET_TIME_Absolute start_time;
  */
 
 #if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
 #else
 #define OKPP do { ok++; } while (0)
 #endif
@@ -142,7 +142,7 @@ end ()
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
   delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  fprintf (stderr, "\nThroughput was %llu kb/s\n",
+  FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
            total_bytes * 1000 / 1024 / delta);
   GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin);
   GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
@@ -281,7 +281,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   n++;
   if (0 == (n % (TOTAL_MSGS / 100)))
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
       GNUNET_SCHEDULER_cancel (die_task);
     test_failed = GNUNET_YES;
@@ -291,7 +291,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   {
     /* because of starting with 0 */
     msg_recv++;
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     end ();
   }
 }
@@ -356,7 +356,7 @@ notify_ready (void *cls, size_t size, void *buf)
   }
   else
   {
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All messages scheduled to be sent!!\n");
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
index c6215c9bc0d73b2033bfbbe53a505767c3e211f1..36d9b18d3fc9cc181ecdd0b61bb12e9d9a7d00ef 100644 (file)
@@ -124,7 +124,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
 
   i = 1;
-  fprintf (stderr, "%i", i);
+  FPRINTF (stderr, "%i", i);
   while (i <= ITERATIONS)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n");
@@ -147,12 +147,12 @@ run (void *cls, char *const *args, const char *cfgfile,
 
     i++;
     if (i <= ITERATIONS)
-      fprintf (stderr, "..%i", i);
+      FPRINTF (stderr, "..%i", i);
   }
 
   tth = GNUNET_TRANSPORT_TESTING_init ();
 
-  fprintf (stderr, "\n");
+  FPRINTF (stderr, "%s",  "\n");
   end ();
 }
 
index c358e6fd8cef0a40e046e3230037ae9e9ac442c5..72a2c67dae4196d4d273c9b574cdf69a14f8397c 100644 (file)
@@ -680,7 +680,7 @@ output_message (enum GNUNET_ErrorType kind, const char *comp,
 
   if (GNUNET_stderr != NULL)
   {
-    fprintf (GNUNET_stderr, "%s %s %s %s", datestr, comp,
+    FPRINTF (GNUNET_stderr, "%s %s %s %s", datestr, comp,
              GNUNET_error_type_to_string (kind), msg);
     fflush (GNUNET_stderr);
   }
index 41a4e1975ad242da6ab3afe1bd55a7d8fe5b599b..eb86d0496dbf79ee4f740aac21bd329ed3b95be1 100644 (file)
@@ -309,7 +309,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
   sec = cfg->sections;
   while (sec != NULL)
   {
-    if (0 > fprintf (fp, "[%s]\n", sec->name))
+    if (0 > FPRINTF (fp, "[%s]\n", sec->name))
     {
       error = 1;
       break;
@@ -327,7 +327,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
           pos[0] = '\\';
           pos[1] = 'n';
         }
-        if (0 > fprintf (fp, "%s = %s\n", ent->key, val))
+        if (0 > FPRINTF (fp, "%s = %s\n", ent->key, val))
         {
           error = 1;
           GNUNET_free (val);
@@ -339,7 +339,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
     }
     if (error != 0)
       break;
-    if (0 > fprintf (fp, "\n"))
+    if (0 > FPRINTF (fp, "%s\n", ""))
     {
       error = 1;
       break;
index ff20646f798768b04c317c9d3bf385fcbdca43b1..121dbef9a544809cf56b9498243e729bec433347 100644 (file)
@@ -303,7 +303,7 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
   gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
   if (!gcry_check_version (GCRYPT_VERSION))
   {
-    fprintf (stderr,
+    FPRINTF (stderr,
              _
              ("libgcrypt has not the expected version (version %s is required).\n"),
              GCRYPT_VERSION);
index 08c133423171fcd119e9032eaa9fb8406c81bb85..169949821ed2a432299c1fea66552a0e98b66c5e 100644 (file)
@@ -669,7 +669,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
     if (ambig && !exact)
     {
       if (GNopterr)
-        fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0],
+        FPRINTF (stderr, _("%s: option `%s' is ambiguous\n"), argv[0],
                  argv[GNoptind]);
       nextchar += strlen (nextchar);
       GNoptind++;
@@ -692,12 +692,12 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
           {
             if (argv[GNoptind - 1][1] == '-')
               /* --option */
-              fprintf (stderr,
+              FPRINTF (stderr,
                        _("%s: option `--%s' does not allow an argument\n"),
                        argv[0], pfound->name);
             else
               /* +option or -option */
-              fprintf (stderr,
+              FPRINTF (stderr,
                        _("%s: option `%c%s' does not allow an argument\n"),
                        argv[0], argv[GNoptind - 1][0], pfound->name);
           }
@@ -715,7 +715,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
         {
           if (GNopterr)
           {
-            fprintf (stderr, _("%s: option `%s' requires an argument\n"),
+            FPRINTF (stderr, _("%s: option `%s' requires an argument\n"),
                      argv[0], argv[GNoptind - 1]);
           }
           nextchar += strlen (nextchar);
@@ -744,11 +744,11 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
       {
         if (argv[GNoptind][1] == '-')
           /* --option */
-          fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0],
+          FPRINTF (stderr, _("%s: unrecognized option `--%s'\n"), argv[0],
                    nextchar);
         else
           /* +option or -option */
-          fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0],
+          FPRINTF (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0],
                    argv[GNoptind][0], nextchar);
       }
       nextchar = (char *) "";
@@ -773,9 +773,9 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
       {
         if (posixly_correct)
           /* 1003.2 specifies the format of this message.  */
-          fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
+          FPRINTF (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
         else
-          fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
+          FPRINTF (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
       }
       return '?';
     }
@@ -803,7 +803,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
         if (GNopterr)
         {
           /* 1003.2 specifies the format of this message.  */
-          fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+          FPRINTF (stderr, _("%s: option requires an argument -- %c\n"),
                    argv[0], c);
         }
         if (optstring[0] == ':')
@@ -851,7 +851,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
       if (ambig && !exact)
       {
         if (GNopterr)
-          fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0],
+          FPRINTF (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0],
                    argv[GNoptind]);
         nextchar += strlen (nextchar);
         GNoptind++;
@@ -869,7 +869,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
           else
           {
             if (GNopterr)
-              fprintf (stderr, _("\
+              FPRINTF (stderr, _("\
 %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name);
 
             nextchar += strlen (nextchar);
@@ -883,7 +883,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
           else
           {
             if (GNopterr)
-              fprintf (stderr, _("%s: option `%s' requires an argument\n"),
+              FPRINTF (stderr, _("%s: option `%s' requires an argument\n"),
                        argv[0], argv[GNoptind - 1]);
             nextchar += strlen (nextchar);
             return optstring[0] == ':' ? ':' : '?';
@@ -931,7 +931,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring,
           if (GNopterr)
           {
             /* 1003.2 specifies the format of this message.  */
-            fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+            FPRINTF (stderr, _("%s: option requires an argument -- %c\n"),
                      argv[0], c);
           }
           if (optstring[0] == ':')
@@ -1035,7 +1035,7 @@ GNUNET_GETOPT_run (const char *binaryOptions,
     }
     if (i == count)
     {
-      fprintf (stderr, _("Use --help to get a list of options.\n"));
+      FPRINTF (stderr, _("Use %s to get a list of options.\n"), "--help");
       cont = GNUNET_SYSERR;
     }
   }
index c74b90877535d0468ec598d594b1e1f0b805590e..8fb3673c0c5d2c92cbd51d7524869c90c7070a6f 100644 (file)
@@ -252,7 +252,7 @@ GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
 
   if (1 != SSCANF (value, "%llu", val))
   {
-    fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option);
+    FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option);
     return GNUNET_SYSERR;
   }
   return GNUNET_OK;
@@ -280,7 +280,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
 
   if (1 != SSCANF (value, "%u", val))
   {
-    fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option);
+    FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option);
     return GNUNET_SYSERR;
   }
   return GNUNET_OK;
index fe5fb87f98931dab6fd84f15e5b0df7f2cdffcdc..4e0385a0984d65c1aa11cb0a7a2f073d65c53ce1 100644 (file)
@@ -86,7 +86,7 @@ plugin_init ()
   err = lt_dlinit ();
   if (err > 0)
   {
-    fprintf (stderr, _("Initialization of plugin mechanism failed: %s!\n"),
+    FPRINTF (stderr, _("Initialization of plugin mechanism failed: %s!\n"),
              lt_dlerror ());
     return;
   }
index 950f0cedbbae991f357190e2f8df71f6e448a04d..438d39751fe8322354a5b4d8e0b28b7d1094e927 100644 (file)
@@ -105,7 +105,7 @@ main (int argc, char *argv[])
   GNUNET_log_setup ("test-common-allocation", "WARNING", NULL);
   ret = check ();
   if (ret != 0)
-    fprintf (stderr, "ERROR %d.\n", ret);
+    FPRINTF (stderr, "ERROR %d.\n", ret);
   return ret;
 }
 
index d057db099cc074ff38ad94a2d412a57e7a9c3cda..934586926027502c965f0774362994c0a1ee7557 100644 (file)
@@ -44,7 +44,7 @@ main (int argc, char *argv[])
   unsigned int logs = 0;
 
   if (0 != putenv ("GNUNET_FORCE_LOG="))
-    fprintf (stderr, "Failed to putenv: %s\n", strerror (errno));
+    FPRINTF (stderr, "Failed to putenv: %s\n", strerror (errno));
   GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null");
   GNUNET_logger_add (&my_log, &logs);
   GNUNET_logger_add (&my_log, &logs);
@@ -60,7 +60,7 @@ main (int argc, char *argv[])
   GNUNET_logger_remove (&my_log, &logs);
   if (logs != 4)
   {
-    fprintf (stdout, "Expected 4 log calls, got %u\n", logs);
+    FPRINTF (stdout, "Expected 4 log calls, got %u\n", logs);
     failureCount++;
   }
   GNUNET_break (0 ==
@@ -84,13 +84,13 @@ main (int argc, char *argv[])
   GNUNET_logger_remove (&my_log, &logs);
   if (logs != 1)
   {
-    fprintf (stdout, "Expected 1 log call, got %u\n", logs);
+    FPRINTF (stdout, "Expected 1 log call, got %u\n", logs);
     failureCount++;
   }
 
   if (failureCount != 0)
   {
-    fprintf (stdout, "%u TESTS FAILED!\n", failureCount);
+    FPRINTF (stdout, "%u TESTS FAILED!\n", failureCount);
     return -1;
   }
   return 0;
index 005b5caef83d2d110b6c1f6ee9ea7c9bfb63806a..9f6756ff4bc6cc624078c6abe504fe8743bd6334 100644 (file)
@@ -37,7 +37,7 @@ my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component,
 {
   if (strncmp ("test-common-logging-dummy", component, 25) != 0)
     return;
-  fprintf (stdout, "%s", msg);
+  FPRINTF (stdout, "%s", msg);
   fflush (stdout);
 }
 
index 9b5b1228ac341a97c8ce5f5e0f9869152fb9427f..51123d9b3716241d9de3053d949dd43c043b8bc3 100644 (file)
@@ -171,7 +171,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     buf_ptr += rd;
     bytes += rd;
 #if VERBOSE
-    fprintf (stderr, "got %d bytes, reading more\n", rd);
+    FPRINTF (stderr, "got %d bytes, reading more\n", rd);
 #endif
     GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
                                     stdout_read_handle, &read_call,
@@ -180,7 +180,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 
 #if VERBOSE
-  fprintf (stderr, "bytes is %d:%s\n", bytes, buf);
+  FPRINTF (stderr, "bytes is %d:%s\n", bytes, buf);
 #endif
 
   /* +------CHILD OUTPUT--
@@ -251,7 +251,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                           &delays[7], level)))
   {
     if (bytes == 20 * 16)
-      fprintf (stderr, "Ran out of buffer space!\n");
+      FPRINTF (stderr, "%s",  "Ran out of buffer space!\n");
     GNUNET_break (0);
     ok = 2;
     GNUNET_SCHEDULER_cancel (die_task);
index 3780b36490dee6282f264272814bb734736d3275..b1a446f86c4406c82289818ba5aea8d43b4d4c5f 100644 (file)
@@ -240,14 +240,14 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option)
   GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData);
   if (1 == (ret = cbData.status))
   {
-    fprintf (stderr,
+    FPRINTF (stderr, "%s", 
              "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n");
     goto housekeeping;
   }
   cbData.cfgDiffs = cfg;
   GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData);
   if ((ret = cbData.status) == 1)
-    fprintf (stderr,
+    FPRINTF (stderr, "%s", 
              "Incorrect Configuration Diffs: Data may be missing in diffs\n");
 
 housekeeping:
@@ -277,7 +277,7 @@ testConfig ()
     return 1;
   if (0 != strcmp ("b", c))
   {
-    fprintf (stderr, "Got `%s'\n", c);
+    FPRINTF (stderr, "Got `%s'\n", c);
     GNUNET_free (c);
     return 2;
   }
@@ -470,7 +470,7 @@ main (int argc, char *argv[])
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_parse (cfg, "test_configuration_data.conf"))
   {
-    fprintf (stderr, "Failed to parse configuration file\n");
+    FPRINTF (stderr, "%s",  "Failed to parse configuration file\n");
     GNUNET_CONFIGURATION_destroy (cfg);
     return 1;
   }
@@ -484,7 +484,7 @@ main (int argc, char *argv[])
 
   if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf"))
   {
-    fprintf (stderr, "Failed to write configuration file\n");
+    FPRINTF (stderr, "%s",  "Failed to write configuration file\n");
     GNUNET_CONFIGURATION_destroy (cfg);
     return 1;
   }
@@ -546,7 +546,7 @@ main (int argc, char *argv[])
 error:
   if (failureCount != 0)
   {
-    fprintf (stderr, "Test failed: %u\n", failureCount);
+    FPRINTF (stderr, "Test failed: %u\n", failureCount);
     return 1;
   }
   return 0;
index a0161b575c439a017a600871fe1819fecfc0acc3..0b7ba5c5469b7c123d6b18b4a9e1c81f410936d1 100644 (file)
@@ -136,7 +136,7 @@ getWeakKeys ()
   {
 
     if (number_of_runs % 1000 == 0)
-      fprintf (stderr, ".");
+      FPRINTF (stderr, "%s",  ".");
     /*printf("Got to run number %d.\n", number_of_runs); */
     GNUNET_CRYPTO_aes_create_session_key (&sessionkey);
 
index 2789f5edb25a224bb1a357a2878d5bfebf70edd9..58c4595475410187a78e91daefc858453c07a6b6 100644 (file)
@@ -46,7 +46,7 @@ testCorrectKey ()
   int i;
   char out[3];
 
-  fprintf (stderr, "Testing KBlock key correctness");
+  FPRINTF (stderr, "%s",  "Testing KBlock key correctness");
   GNUNET_CRYPTO_hash ("X", strlen ("X"), &in);
   hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in);
   if (hostkey == NULL)
@@ -66,12 +66,12 @@ testCorrectKey ()
     snprintf (out, sizeof (out), "%02x", ((unsigned char *) &pkey)[i]);
     if (0 != strncmp (out, &want[i * 2], 2))
     {
-      fprintf (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2],
+      FPRINTF (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2],
                out, i);
       return GNUNET_SYSERR;
     }
   }
-  fprintf (stderr, " OK\n");
+  FPRINTF (stderr, "%s",  " OK\n");
   return GNUNET_OK;
 }
 
@@ -85,7 +85,7 @@ testMultiKey (const char *word)
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1;
   int i;
 
-  fprintf (stderr, "Testing KBlock key uniqueness (%s) ", word);
+  FPRINTF (stderr, "Testing KBlock key uniqueness (%s) ", word);
   GNUNET_CRYPTO_hash (word, strlen (word), &in);
   hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in);
   if (hostkey == NULL)
@@ -101,12 +101,12 @@ testMultiKey (const char *word)
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   for (i = 0; i < UNIQUE_ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in);
     if (hostkey == NULL)
     {
       GNUNET_break (0);
-      fprintf (stderr, " ERROR\n");
+      FPRINTF (stderr, "%s",  " ERROR\n");
       return GNUNET_SYSERR;
     }
     GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey1);
@@ -116,11 +116,11 @@ testMultiKey (const char *word)
                 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))
     {
       GNUNET_break (0);
-      fprintf (stderr, " ERROR\n");
+      FPRINTF (stderr, "%s",  " ERROR\n");
       return GNUNET_SYSERR;
     }
   }
-  fprintf (stderr, " OK\n");
+  FPRINTF (stderr, "%s",  " OK\n");
   return GNUNET_OK;
 }
 
@@ -135,19 +135,19 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
   struct GNUNET_TIME_Absolute start;
   int ok;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
 
   ok = 0;
   start = GNUNET_TIME_absolute_get ();
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR ==
         GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey,
                                    &target))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -155,7 +155,7 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
         GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result,
                                    strlen (TESTSTRING) + 1))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -186,17 +186,17 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
   struct GNUNET_TIME_Absolute start;
   int ok = GNUNET_OK;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
   start = GNUNET_TIME_absolute_get ();
   purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose));
   purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
       ok = GNUNET_SYSERR;
       continue;
     }
index 46d3ed0aa099a2340cfa421736c1192982d20c26..681947a60b9a12e9cdb8950d22236d4663f7557b 100644 (file)
@@ -43,7 +43,7 @@ test (enum GNUNET_CRYPTO_Quality mode)
     b2 = GNUNET_CRYPTO_random_permute (mode, 1024);
     if (0 == memcmp (b2, buf, sizeof (buf)))
     {
-      fprintf (stderr, "!");
+      FPRINTF (stderr, "%s",  "!");
       GNUNET_free (b2);
       continue;
     }
index f26a76a38f833569b97cff5c0376ac678a0f3c64..f6800afcd23fcb3e85d64f3ce743432efa82c0ca 100644 (file)
@@ -47,7 +47,7 @@ testEncryptDecrypt ()
   struct GNUNET_TIME_Absolute start;
   int ok;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   hostkey = GNUNET_CRYPTO_rsa_key_create ();
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
 
@@ -55,12 +55,12 @@ testEncryptDecrypt ()
   start = GNUNET_TIME_absolute_get ();
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR ==
         GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey,
                                    &target))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -68,7 +68,7 @@ testEncryptDecrypt ()
         GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result,
                                    strlen (TESTSTRING) + 1))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
       ok++;
       continue;
 
@@ -102,7 +102,7 @@ testEncryptPerformance ()
   struct GNUNET_TIME_Absolute start;
   int ok;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   hostkey = GNUNET_CRYPTO_rsa_key_create ();
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
 
@@ -110,12 +110,12 @@ testEncryptPerformance ()
   start = GNUNET_TIME_absolute_get ();
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR ==
         GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey,
                                    &target))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -142,7 +142,7 @@ testEncryptDecryptSK ()
   struct GNUNET_TIME_Absolute start;
   int ok;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   hostkey = GNUNET_CRYPTO_rsa_key_create ();
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
 
@@ -150,14 +150,14 @@ testEncryptDecryptSK ()
   start = GNUNET_TIME_absolute_get ();
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     GNUNET_CRYPTO_aes_create_session_key (&insk);
     if (GNUNET_SYSERR ==
         GNUNET_CRYPTO_rsa_encrypt (&insk,
                                    sizeof (struct GNUNET_CRYPTO_AesSessionKey),
                                    &pkey, &target))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -165,7 +165,7 @@ testEncryptDecryptSK ()
         GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, &outsk,
                                    sizeof (struct GNUNET_CRYPTO_AesSessionKey)))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n");
       ok++;
       continue;
     }
@@ -198,7 +198,7 @@ testSignVerify ()
   struct GNUNET_TIME_Absolute start;
   int ok = GNUNET_OK;
 
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   hostkey = GNUNET_CRYPTO_rsa_key_create ();
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
   start = GNUNET_TIME_absolute_get ();
@@ -207,10 +207,10 @@ testSignVerify ()
 
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
       ok = GNUNET_SYSERR;
       continue;
     }
@@ -253,16 +253,16 @@ testSignPerformance ()
 
   purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose));
   purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
-  fprintf (stderr, "W");
+  FPRINTF (stderr, "%s",  "W");
   hostkey = GNUNET_CRYPTO_rsa_key_create ();
   GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey);
   start = GNUNET_TIME_absolute_get ();
   for (i = 0; i < ITER; i++)
   {
-    fprintf (stderr, ".");
+    FPRINTF (stderr, "%s",  ".");
     if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig))
     {
-      fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
+      FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_rsa_sign returned SYSERR\n");
       ok = GNUNET_SYSERR;
       continue;
     }
index 91154a6f5efaadbecf0deee1ed1efda99d12f65f..5462772567bfec06798c6251e3d4797093943fb5 100644 (file)
@@ -46,13 +46,13 @@ testReadWrite ()
   ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1);
   if (ret < 0)
   {
-    fprintf (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile");
+    FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile");
     return 1;
   }
   tmp[ret] = '\0';
   if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1))
   {
-    fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp,
+    FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp,
              TESTSTRING, ".testfile");
     return 1;
   }
@@ -61,14 +61,14 @@ testReadWrite ()
   ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1);
   if (ret < 0)
   {
-    fprintf (stderr, "Error reading file `%s' in testReadWrite\n",
+    FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n",
              ".testfile2");
     return 1;
   }
   tmp[ret] = '\0';
   if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1))
   {
-    fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp,
+    FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp,
              TESTSTRING, ".testfile2");
     return 1;
   }
@@ -276,7 +276,7 @@ main (int argc, char *argv[])
   failureCount += testDirMani ();
   if (failureCount != 0)
   {
-    fprintf (stderr, "\n%u TESTS FAILED!\n", failureCount);
+    FPRINTF (stderr, "\n%u TESTS FAILED!\n", failureCount);
     return -1;
   }
   return 0;
index df852054601274848034e65aaed5c17d064a4e84..78538404a6b6179b0058590edd8d26d13b680583 100644 (file)
@@ -75,7 +75,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf));
 
 #if VERBOSE
-  fprintf (stderr, "bytes is %d\n", bytes);
+  FPRINTF (stderr, "bytes is %d\n", bytes);
 #endif
 
   if (bytes < 1)
@@ -89,7 +89,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   ok = strncmp (&buf[0], test_phrase, strlen (test_phrase));
 #if VERBOSE
-  fprintf (stderr, "read %s\n", &buf[0]);
+  FPRINTF (stderr, "read %s\n", &buf[0]);
 #endif
   if (ok == 0)
   {
index 3817d82437d6da788f18f88e3120d42a980bbc3e..9bf44360045993bfb7dc0c7735ccadea2a17cd3b 100644 (file)
@@ -69,7 +69,7 @@ check ()
     pid = GNUNET_PEER_intern (&pidArr[i]);
     if (pid != (i + 1))
     {
-      fprintf (stderr, "Unexpected Peer ID returned by intern function\n");
+      FPRINTF (stderr, "%s",  "Unexpected Peer ID returned by intern function\n");
       return 1;
     }
   }
@@ -80,7 +80,7 @@ check ()
     pid = GNUNET_PEER_intern (&pidArr[i]);
     if (pid != (i + 1))
     {
-      fprintf (stderr, "Unexpected Peer ID returned by intern function\n");
+      FPRINTF (stderr, "%s",  "Unexpected Peer ID returned by intern function\n");
       return 1;
     }
   }
index 4e248aa725edeb6dbc29b30c2ba5aa702a1b4d80..75140f8d5926c0ab70fed64ca0b9229eb02fc732 100644 (file)
@@ -264,8 +264,8 @@ run (void *cls, char *const *args, const char *cfgfile,
                 _("gethostbyname() could not lookup IP address: %s\n"),
                 hstrerror (h_errno));
 #endif
-    fprintf (stderr,
-             "System seems to be off-line, will not run all DNS tests\n");
+    FPRINTF (stderr,
+             "System seems to be off-line, will not run all DNS tests\n", NULL);
     *ok = 0;                    /* mark test as passing anyway */
     return;
   }
@@ -422,7 +422,7 @@ check ()
   GNUNET_OS_process_close (proc);
   proc = NULL;
   if (ok != 0)
-    fprintf (stderr, "Missed some resolutions: %u\n", ok);
+    FPRINTF (stderr, "Missed some resolutions: %u\n", ok);
   return ok;
 }
 
index ff6966a87a68b625039b0b2f0f049f2493b8ebf4..9cbf7d90f36eb2abf613fdb45c776d6367c7b3f3 100644 (file)
@@ -59,10 +59,10 @@ test_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   target =
       GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
                                         (GNUNET_TIME_UNIT_MILLISECONDS, i));
-  fprintf (stderr, ".");
+  FPRINTF (stderr, "%s",  ".");
   if (i > MAXV)
   {
-    fprintf (stderr, "\n");
+    FPRINTF (stderr, "%s",  "\n");
     return;
   }
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -79,13 +79,13 @@ check ()
   FPRINTF (stdout, "Sleep precision: %llu ms. ",
            cumDelta / 1000 / (MAXV / INCR));
   if (cumDelta <= 10 * MAXV / INCR)
-    fprintf (stdout, "Timer precision is excellent.\n");
+    FPRINTF (stdout, "%s",  "Timer precision is excellent.\n");
   else if (cumDelta <= 50 * MAXV / INCR)        /* 50 ms average deviation */
-    fprintf (stdout, "Timer precision is good.\n");
+    FPRINTF (stdout, "%s",  "Timer precision is good.\n");
   else if (cumDelta > 250 * MAXV / INCR)
-    fprintf (stdout, "Timer precision is awful.\n");
+    FPRINTF (stdout, "%s",  "Timer precision is awful.\n");
   else
-    fprintf (stdout, "Timer precision is acceptable.\n");
+    FPRINTF (stdout, "%s",  "Timer precision is acceptable.\n");
   return 0;
 }
 
index 1b78932f85634cdb284e3074d7ea6f12a44e1ae4..eff8c75703d4baec7a0aafecb3f373543b70bc7b 100644 (file)
@@ -270,7 +270,7 @@ main (int argc, char *argv[])
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
       return 1;
     }
-    fprintf (stderr,
+    FPRINTF (stderr,
              "IPv6 support seems to not be available (%s), not testing it!\n",
              strerror (errno));
   }
index c6d6041447a98392967c172dc6a84aeb54015909..7e68153d7806aa5c50e25b6f00ea4a8fcfa500cf 100644 (file)
@@ -89,7 +89,7 @@ check ()
    * however, the "0:05 19" should always be there; hence: */
   if (NULL == strstr (r, "0:05 19"))
   {
-    fprintf (stderr, "Got %s\n", r);
+    FPRINTF (stderr, "Got %s\n", r);
     GNUNET_break (0);
     GNUNET_free (r);
     return 1;