summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_testing_large_topology.c62
-rw-r--r--src/testing/test_testing_reconnect.c8
-rw-r--r--src/testing/test_testing_topology.c64
-rw-r--r--src/testing/test_testing_topology_blacklist.c8
-rw-r--r--src/testing/testing_group.c16
-rw-r--r--src/testing/testing_peergroup.c8
6 files changed, 83 insertions, 83 deletions
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c
index e966ca137..2bca7b3b9 100644
--- a/src/testing/test_testing_large_topology.c
+++ b/src/testing/test_testing_large_topology.c
@@ -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 =
diff --git a/src/testing/test_testing_reconnect.c b/src/testing/test_testing_reconnect.c
index 20c628c6a..bcee38659 100644
--- a/src/testing/test_testing_reconnect.c
+++ b/src/testing/test_testing_reconnect.c
@@ -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);
}
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index 7d0c0da5f..17f3be89a 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -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 =
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c
index 095c5b2a2..9ff1fcbaa 100644
--- a/src/testing/test_testing_topology_blacklist.c
+++ b/src/testing/test_testing_topology_blacklist.c
@@ -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
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index f56c51381..4f67179c1 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -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
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index bf69a7fc8..a34cb5abe 100644
--- a/src/testing/testing_peergroup.c
+++ b/src/testing/testing_peergroup.c
@@ -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++;