From 50f6a48fbf936d5a4ba272ec5d8f11ff8cbc31e3 Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Wed, 3 Aug 2016 23:20:39 +0000 Subject: [PATCH] social fixes --- src/social/social_api.c | 6 ++---- src/social/test_social.c | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/social/social_api.c b/src/social/social_api.c index f7b536bcf..66af14813 100644 --- a/src/social/social_api.c +++ b/src/social/social_api.c @@ -972,7 +972,7 @@ app_recv_place (void *cls, hconn->app = app; hconn->plc_msg = *pmsg; app->host_cb (app->cb_cls, hconn, ego, &pmsg->place_pub_key, pmsg->place_state); - // FIXME: should this have a GNUNET_free (hconn) here? + GNUNET_free (hconn); } } else if (NULL != app->guest_cb) @@ -981,7 +981,7 @@ app_recv_place (void *cls, gconn->app = app; gconn->plc_msg = *pmsg; app->guest_cb (app->cb_cls, gconn, ego, &pmsg->place_pub_key, pmsg->place_state); - // GNUNET_free (gconn); // FIXME: is this correct here? apparently not! + GNUNET_free (gconn); } } @@ -1284,7 +1284,6 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn, plc->connect_msg = &hreq->header; place_send_connect_msg (plc); - GNUNET_free (hconn); return hst; } @@ -1849,7 +1848,6 @@ GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn plc->connect_msg = &greq->header; place_send_connect_msg (plc); - GNUNET_free (gconn); return gst; } diff --git a/src/social/test_social.c b/src/social/test_social.c index 71519bf59..6a2768030 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c @@ -404,6 +404,11 @@ app_connected (void *cls) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "App connected: %p\n", cls); + if (NULL != core) + { + GNUNET_CORE_disconnect (core); + core = NULL; + } } @@ -1269,12 +1274,6 @@ host_enter () static void id_host_created (void *cls, const char *emsg) { - if (NULL != core) - { - GNUNET_CORE_disconnect (core); - core = NULL; - } - if (NULL != emsg) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, -- 2.25.1