aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-transport.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-16 11:27:08 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-16 11:27:08 +0000
commitf736b24935d66733e9a53798fbc87dbc8aff9fca (patch)
treeb7f865216ca4b40a4a6e4535dfa6677700a27efc /src/transport/gnunet-transport.c
parentc5784d2c94adcf1fe80e88c9ab1c152ce2fcbe95 (diff)
downloadgnunet-f736b24935d66733e9a53798fbc87dbc8aff9fca.tar.gz
gnunet-f736b24935d66733e9a53798fbc87dbc8aff9fca.zip
-fixing #2546
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r--src/transport/gnunet-transport.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 36c02014e..1c865ad94 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -447,14 +447,13 @@ monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
447{ 447{
448 monitor_connections_counter ++; 448 monitor_connections_counter ++;
449 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get(); 449 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
450 char *now_str = GNUNET_STRINGS_absolute_time_to_string (now); 450 const char *now_str = GNUNET_STRINGS_absolute_time_to_string (now);
451
451 FPRINTF (stdout, _("%24s: %-17s %4s (%u connections in total)\n"), 452 FPRINTF (stdout, _("%24s: %-17s %4s (%u connections in total)\n"),
452 now_str, 453 now_str,
453 _("Connected to"), 454 _("Connected to"),
454 GNUNET_i2s (peer), 455 GNUNET_i2s (peer),
455 monitor_connections_counter); 456 monitor_connections_counter);
456
457 GNUNET_free (now_str);
458} 457}
459 458
460 459
@@ -469,7 +468,7 @@ static void
469monitor_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) 468monitor_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
470{ 469{
471 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get(); 470 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
472 char *now_str = GNUNET_STRINGS_absolute_time_to_string (now); 471 const char *now_str = GNUNET_STRINGS_absolute_time_to_string (now);
473 472
474 GNUNET_assert (monitor_connections_counter > 0); 473 GNUNET_assert (monitor_connections_counter > 0);
475 monitor_connections_counter --; 474 monitor_connections_counter --;
@@ -479,7 +478,6 @@ monitor_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
479 _("Disconnected from"), 478 _("Disconnected from"),
480 GNUNET_i2s (peer), 479 GNUNET_i2s (peer),
481 monitor_connections_counter); 480 monitor_connections_counter);
482 GNUNET_free (now_str);
483} 481}
484 482
485 483