aboutsummaryrefslogtreecommitdiff
path: root/src/core
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/core
parentc5784d2c94adcf1fe80e88c9ab1c152ce2fcbe95 (diff)
-fixing #2546
Diffstat (limited to 'src/core')
-rw-r--r--src/core/gnunet-core.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c
index ebdd8aab36..571a2a53dc 100644
--- a/src/core/gnunet-core.c
+++ b/src/core/gnunet-core.c
@@ -110,7 +110,8 @@ monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
{
struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
- char *now_str;
+ const char *now_str;
+
if (0 != memcmp (&my_id, peer, sizeof (my_id)))
{
monitor_connections_counter ++;
@@ -120,8 +121,6 @@ monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
_("Connected to"),
GNUNET_i2s (peer),
monitor_connections_counter);
-
- GNUNET_free (now_str);
}
}
@@ -137,21 +136,19 @@ static void
monitor_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
- char *now_str;
+ const char *now_str;
if (0 != memcmp (&my_id, peer, sizeof (my_id)))
{
now_str = GNUNET_STRINGS_absolute_time_to_string (now);
GNUNET_assert (monitor_connections_counter > 0);
- monitor_connections_counter --;
-
+ monitor_connections_counter--;
FPRINTF (stdout, _("%24s: %-17s %4s (%u connections in total)\n"),
now_str,
_("Disconnected from"),
GNUNET_i2s (peer),
monitor_connections_counter);
- GNUNET_free (now_str);
}
}