aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/gnunet-statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/gnunet-statistics.c')
-rw-r--r--src/statistics/gnunet-statistics.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index bc30670e9..f1ea8cb19 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -216,7 +216,7 @@ printer (void *cls, const struct GNUNET_HashCode *key, void *value)
216 if (GNUNET_YES == watch) 216 if (GNUNET_YES == watch)
217 { 217 {
218 now_str = GNUNET_STRINGS_absolute_time_to_string (now); 218 now_str = GNUNET_STRINGS_absolute_time_to_string (now);
219 FPRINTF (stdout, 219 fprintf (stdout,
220 "%24s%s %s%s%12s%s %s%50s%s%s ", 220 "%24s%s %s%s%12s%s %s%50s%s%s ",
221 now_str, 221 now_str,
222 csv_separator, 222 csv_separator,
@@ -231,7 +231,7 @@ printer (void *cls, const struct GNUNET_HashCode *key, void *value)
231 } 231 }
232 else 232 else
233 { 233 {
234 FPRINTF (stdout, 234 fprintf (stdout,
235 "%s%s%12s%s %s%50s%s%s ", 235 "%s%s%12s%s %s%50s%s%s ",
236 value_set->is_persistent ? "!" : " ", 236 value_set->is_persistent ? "!" : " ",
237 csv_separator, 237 csv_separator,
@@ -245,12 +245,12 @@ printer (void *cls, const struct GNUNET_HashCode *key, void *value)
245 } 245 }
246 for (unsigned i = 0; i < num_nodes; i++) 246 for (unsigned i = 0; i < num_nodes; i++)
247 { 247 {
248 FPRINTF (stdout, 248 fprintf (stdout,
249 "%16llu%s", 249 "%16llu%s",
250 (unsigned long long) value_set->values[i], 250 (unsigned long long) value_set->values[i],
251 csv_separator); 251 csv_separator);
252 } 252 }
253 FPRINTF (stdout, "\n"); 253 fprintf (stdout, "\n");
254 GNUNET_free (value_set->subsystem); 254 GNUNET_free (value_set->subsystem);
255 GNUNET_free (value_set->name); 255 GNUNET_free (value_set->name);
256 GNUNET_free (value_set->values); 256 GNUNET_free (value_set->values);
@@ -283,7 +283,7 @@ printer_watch (void *cls,
283 if (GNUNET_YES == watch) 283 if (GNUNET_YES == watch)
284 { 284 {
285 now_str = GNUNET_STRINGS_absolute_time_to_string (now); 285 now_str = GNUNET_STRINGS_absolute_time_to_string (now);
286 FPRINTF (stdout, 286 fprintf (stdout,
287 "%24s%s %s%s%12s%s %s%50s%s%s %16llu\n", 287 "%24s%s %s%s%12s%s %s%50s%s%s %16llu\n",
288 now_str, 288 now_str,
289 csv_separator, 289 csv_separator,
@@ -299,7 +299,7 @@ printer_watch (void *cls,
299 } 299 }
300 else 300 else
301 { 301 {
302 FPRINTF (stdout, 302 fprintf (stdout,
303 "%s%s%12s%s %s%50s%s%s %16llu\n", 303 "%s%s%12s%s %s%50s%s%s %16llu\n",
304 is_persistent ? "!" : " ", 304 is_persistent ? "!" : " ",
305 csv_separator, 305 csv_separator,
@@ -313,7 +313,7 @@ printer_watch (void *cls,
313 } 313 }
314 } 314 }
315 else 315 else
316 FPRINTF (stdout, "%llu\n", (unsigned long long) value); 316 fprintf (stdout, "%llu\n", (unsigned long long) value);
317 317
318 return GNUNET_OK; 318 return GNUNET_OK;
319} 319}
@@ -401,9 +401,9 @@ continuation_print (void *cls, int success)
401 if (GNUNET_OK != success) 401 if (GNUNET_OK != success)
402 { 402 {
403 if (NULL == remote_host) 403 if (NULL == remote_host)
404 FPRINTF (stderr, "%s", _ ("Failed to obtain statistics.\n")); 404 fprintf (stderr, "%s", _ ("Failed to obtain statistics.\n"));
405 else 405 else
406 FPRINTF (stderr, 406 fprintf (stderr,
407 _ ("Failed to obtain statistics from host `%s:%llu'\n"), 407 _ ("Failed to obtain statistics from host `%s:%llu'\n"),
408 remote_host, 408 remote_host,
409 remote_port); 409 remote_port);
@@ -439,9 +439,9 @@ cleanup (void *cls, int success)
439 if (GNUNET_OK != success) 439 if (GNUNET_OK != success)
440 { 440 {
441 if (NULL == remote_host) 441 if (NULL == remote_host)
442 FPRINTF (stderr, "%s", _ ("Failed to obtain statistics.\n")); 442 fprintf (stderr, "%s", _ ("Failed to obtain statistics.\n"));
443 else 443 else
444 FPRINTF (stderr, 444 fprintf (stderr,
445 _ ("Failed to obtain statistics from host `%s:%llu'\n"), 445 _ ("Failed to obtain statistics from host `%s:%llu'\n"),
446 remote_host, 446 remote_host,
447 remote_port); 447 remote_port);
@@ -478,7 +478,7 @@ collector (void *cls,
478 478
479 len_subsys_name = strlen (subsystem) + 3 + strlen (name) + 1; 479 len_subsys_name = strlen (subsystem) + 3 + strlen (name) + 1;
480 subsys_name = GNUNET_malloc (len_subsys_name); 480 subsys_name = GNUNET_malloc (len_subsys_name);
481 SPRINTF (subsys_name, "%s---%s", subsystem, name); 481 sprintf (subsys_name, "%s---%s", subsystem, name);
482 key = &hc; 482 key = &hc;
483 GNUNET_CRYPTO_hash (subsys_name, len_subsys_name, key); 483 GNUNET_CRYPTO_hash (subsys_name, len_subsys_name, key);
484 GNUNET_free (subsys_name); 484 GNUNET_free (subsys_name);
@@ -515,13 +515,13 @@ main_task (void *cls)
515 { 515 {
516 if (NULL == subsystem) 516 if (NULL == subsystem)
517 { 517 {
518 FPRINTF (stderr, "%s", _ ("Missing argument: subsystem \n")); 518 fprintf (stderr, "%s", _ ("Missing argument: subsystem \n"));
519 ret = 1; 519 ret = 1;
520 return; 520 return;
521 } 521 }
522 if (NULL == name) 522 if (NULL == name)
523 { 523 {
524 FPRINTF (stderr, "%s", _ ("Missing argument: name\n")); 524 fprintf (stderr, "%s", _ ("Missing argument: name\n"));
525 ret = 1; 525 ret = 1;
526 return; 526 return;
527 } 527 }
@@ -605,7 +605,7 @@ iter_check_config (void *cls, const char *filename)
605 if (GNUNET_OK != 605 if (GNUNET_OK !=
606 GNUNET_CONFIGURATION_load (nodes[num_nodes - 1].conf, filename)) 606 GNUNET_CONFIGURATION_load (nodes[num_nodes - 1].conf, filename))
607 { 607 {
608 FPRINTF (stderr, "Failed loading config `%s'\n", filename); 608 fprintf (stderr, "Failed loading config `%s'\n", filename);
609 return GNUNET_SYSERR; 609 return GNUNET_SYSERR;
610 } 610 }
611 return GNUNET_NO; 611 return GNUNET_NO;
@@ -636,7 +636,7 @@ iter_testbed_path (void *cls, const char *filename)
636 unsigned index_node; 636 unsigned index_node;
637 637
638 GNUNET_assert (NULL != filename); 638 GNUNET_assert (NULL != filename);
639 if (1 == SSCANF (GNUNET_STRINGS_get_short_name (filename), "%u", &index_node)) 639 if (1 == sscanf (GNUNET_STRINGS_get_short_name (filename), "%u", &index_node))
640 { 640 {
641 if (-1 == GNUNET_DISK_directory_scan (filename, iter_check_config, NULL)) 641 if (-1 == GNUNET_DISK_directory_scan (filename, iter_check_config, NULL))
642 { 642 {
@@ -665,7 +665,7 @@ discover_testbed_nodes (const char *path_testbed)
665 GNUNET_DISK_directory_scan (path_testbed, iter_testbed_path, NULL); 665 GNUNET_DISK_directory_scan (path_testbed, iter_testbed_path, NULL);
666 if (-1 == num_dir_entries) 666 if (-1 == num_dir_entries)
667 { 667 {
668 FPRINTF (stderr, "Failure during scanning directory `%s'\n", path_testbed); 668 fprintf (stderr, "Failure during scanning directory `%s'\n", path_testbed);
669 return -1; 669 return -1;
670 } 670 }
671 return 0; 671 return 0;
@@ -693,9 +693,9 @@ run (void *cls,
693 csv_separator = ""; 693 csv_separator = "";
694 if (NULL != args[0]) 694 if (NULL != args[0])
695 { 695 {
696 if (1 != SSCANF (args[0], "%llu", &set_val)) 696 if (1 != sscanf (args[0], "%llu", &set_val))
697 { 697 {
698 FPRINTF (stderr, _ ("Invalid argument `%s'\n"), args[0]); 698 fprintf (stderr, _ ("Invalid argument `%s'\n"), args[0]);
699 ret = 1; 699 ret = 1;
700 return; 700 return;
701 } 701 }
@@ -710,7 +710,7 @@ run (void *cls,
710 "PORT", 710 "PORT",
711 &remote_port)) 711 &remote_port))
712 { 712 {
713 FPRINTF (stderr, 713 fprintf (stderr,
714 _ ("A port is required to connect to host `%s'\n"), 714 _ ("A port is required to connect to host `%s'\n"),
715 remote_host); 715 remote_host);
716 return; 716 return;
@@ -718,7 +718,7 @@ run (void *cls,
718 } 718 }
719 else if (65535 <= remote_port) 719 else if (65535 <= remote_port)
720 { 720 {
721 FPRINTF (stderr, 721 fprintf (stderr,
722 _ ( 722 _ (
723 "A port has to be between 1 and 65535 to connect to host `%s'\n"), 723 "A port has to be between 1 and 65535 to connect to host `%s'\n"),
724 remote_host); 724 remote_host);