diff options
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r-- | src/transport/gnunet-transport.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 02a5ee492..17a21dd28 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -167,11 +167,11 @@ display_test_result (struct TestContext *tc, int result) | |||
167 | { | 167 | { |
168 | if (GNUNET_YES != result) | 168 | if (GNUNET_YES != result) |
169 | { | 169 | { |
170 | fprintf (stderr, "Configuration for plugin `%s' did not work!\n", tc->name); | 170 | FPRINTF (stderr, "Configuration for plugin `%s' did not work!\n", tc->name); |
171 | } | 171 | } |
172 | else | 172 | else |
173 | { | 173 | { |
174 | fprintf (stderr, "Configuration for plugin `%s' is working!\n", tc->name); | 174 | FPRINTF (stderr, "Configuration for plugin `%s' is working!\n", tc->name); |
175 | } | 175 | } |
176 | if (GNUNET_SCHEDULER_NO_TASK != tc->tsk) | 176 | if (GNUNET_SCHEDULER_NO_TASK != tc->tsk) |
177 | { | 177 | { |
@@ -245,9 +245,9 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
245 | GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins", | 245 | GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins", |
246 | &plugins)) | 246 | &plugins)) |
247 | { | 247 | { |
248 | fprintf (stderr, | 248 | FPRINTF (stderr, |
249 | _ | 249 | _ |
250 | ("No transport plugins configured, peer will never communicate\n")); | 250 | ("No transport plugins configured, peer will never communicate\n"), NULL); |
251 | ret = 4; | 251 | ret = 4; |
252 | return; | 252 | return; |
253 | } | 253 | } |
@@ -259,7 +259,7 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
259 | if (GNUNET_OK != | 259 | if (GNUNET_OK != |
260 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port)) | 260 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port)) |
261 | { | 261 | { |
262 | fprintf (stderr, | 262 | FPRINTF (stderr, |
263 | _("No port configured for plugin `%s', cannot test it\n"), tok); | 263 | _("No port configured for plugin `%s', cannot test it\n"), tok); |
264 | continue; | 264 | continue; |
265 | } | 265 | } |
@@ -310,14 +310,14 @@ do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
310 | if (benchmark_receive) | 310 | if (benchmark_receive) |
311 | { | 311 | { |
312 | duration = GNUNET_TIME_absolute_get_duration (start_time); | 312 | duration = GNUNET_TIME_absolute_get_duration (start_time); |
313 | fprintf (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"), | 313 | FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"), |
314 | 1000 * traffic_received / (1 + duration.rel_value), | 314 | 1000 * traffic_received / (1 + duration.rel_value), |
315 | traffic_received, (unsigned long long) duration.rel_value); | 315 | traffic_received, (unsigned long long) duration.rel_value); |
316 | } | 316 | } |
317 | if (benchmark_send) | 317 | if (benchmark_send) |
318 | { | 318 | { |
319 | duration = GNUNET_TIME_absolute_get_duration (start_time); | 319 | duration = GNUNET_TIME_absolute_get_duration (start_time); |
320 | fprintf (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"), | 320 | FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"), |
321 | 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent, | 321 | 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent, |
322 | (unsigned long long) duration.rel_value); | 322 | (unsigned long long) duration.rel_value); |
323 | } | 323 | } |
@@ -350,7 +350,7 @@ transmit_data (void *cls, size_t size, void *buf) | |||
350 | GNUNET_TIME_UNIT_FOREVER_REL, | 350 | GNUNET_TIME_UNIT_FOREVER_REL, |
351 | &transmit_data, NULL); | 351 | &transmit_data, NULL); |
352 | if (verbosity > 0) | 352 | if (verbosity > 0) |
353 | fprintf (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size, | 353 | FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size, |
354 | GNUNET_i2s (&pid)); | 354 | GNUNET_i2s (&pid)); |
355 | return size; | 355 | return size; |
356 | } | 356 | } |
@@ -370,7 +370,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
370 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) | 370 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) |
371 | { | 371 | { |
372 | if (verbosity > 0) | 372 | if (verbosity > 0) |
373 | fprintf (stdout, _("Connected to %s\n"), GNUNET_i2s (peer)); | 373 | FPRINTF (stdout, _("Connected to %s\n"), GNUNET_i2s (peer)); |
374 | if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) | 374 | if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) |
375 | return; | 375 | return; |
376 | ret = 0; | 376 | ret = 0; |
@@ -401,7 +401,7 @@ static void | |||
401 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | 401 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) |
402 | { | 402 | { |
403 | if (verbosity > 0) | 403 | if (verbosity > 0) |
404 | fprintf (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer)); | 404 | FPRINTF (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer)); |
405 | if ((0 == memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) && | 405 | if ((0 == memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) && |
406 | (NULL != th)) | 406 | (NULL != th)) |
407 | { | 407 | { |
@@ -430,7 +430,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
430 | if (!benchmark_receive) | 430 | if (!benchmark_receive) |
431 | return; | 431 | return; |
432 | if (verbosity > 0) | 432 | if (verbosity > 0) |
433 | fprintf (stdout, _("Received %u bytes from %s\n"), | 433 | FPRINTF (stdout, _("Received %u bytes from %s\n"), |
434 | (unsigned int) ntohs (message->size), GNUNET_i2s (peer)); | 434 | (unsigned int) ntohs (message->size), GNUNET_i2s (peer)); |
435 | if (traffic_received == 0) | 435 | if (traffic_received == 0) |
436 | start_time = GNUNET_TIME_absolute_get (); | 436 | start_time = GNUNET_TIME_absolute_get (); |
@@ -444,7 +444,7 @@ process_string (void *cls, const char *address) | |||
444 | 444 | ||
445 | if ((address != NULL)) | 445 | if ((address != NULL)) |
446 | { | 446 | { |
447 | fprintf (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address); | 447 | FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address); |
448 | } | 448 | } |
449 | else | 449 | else |
450 | { | 450 | { |
@@ -499,7 +499,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
499 | } | 499 | } |
500 | if (benchmark_send && (NULL == cpid)) | 500 | if (benchmark_send && (NULL == cpid)) |
501 | { | 501 | { |
502 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 502 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
503 | "-s", "-C"); | 503 | "-s", "-C"); |
504 | return; | 504 | return; |
505 | } | 505 | } |
@@ -508,7 +508,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
508 | ret = 1; | 508 | ret = 1; |
509 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey)) | 509 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey)) |
510 | { | 510 | { |
511 | fprintf (stderr, _("Failed to parse peer identity `%s'\n"), cpid); | 511 | FPRINTF (stderr, _("Failed to parse peer identity `%s'\n"), cpid); |
512 | return; | 512 | return; |
513 | } | 513 | } |
514 | handle = | 514 | handle = |