diff options
author | Gabor X Toth <*@tg-x.net> | 2016-08-03 23:20:39 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-08-03 23:20:39 +0000 |
commit | 50f6a48fbf936d5a4ba272ec5d8f11ff8cbc31e3 (patch) | |
tree | aafcc96c2b14e9a330b0deaec0c0bfd092ddc6f6 /src/social | |
parent | 7d83c569d7ea76376a7bc97db58a4ad912dfad8c (diff) | |
download | gnunet-50f6a48fbf936d5a4ba272ec5d8f11ff8cbc31e3.tar.gz gnunet-50f6a48fbf936d5a4ba272ec5d8f11ff8cbc31e3.zip |
social fixes
Diffstat (limited to 'src/social')
-rw-r--r-- | src/social/social_api.c | 6 | ||||
-rw-r--r-- | 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, | |||
972 | hconn->app = app; | 972 | hconn->app = app; |
973 | hconn->plc_msg = *pmsg; | 973 | hconn->plc_msg = *pmsg; |
974 | app->host_cb (app->cb_cls, hconn, ego, &pmsg->place_pub_key, pmsg->place_state); | 974 | app->host_cb (app->cb_cls, hconn, ego, &pmsg->place_pub_key, pmsg->place_state); |
975 | // FIXME: should this have a GNUNET_free (hconn) here? | 975 | GNUNET_free (hconn); |
976 | } | 976 | } |
977 | } | 977 | } |
978 | else if (NULL != app->guest_cb) | 978 | else if (NULL != app->guest_cb) |
@@ -981,7 +981,7 @@ app_recv_place (void *cls, | |||
981 | gconn->app = app; | 981 | gconn->app = app; |
982 | gconn->plc_msg = *pmsg; | 982 | gconn->plc_msg = *pmsg; |
983 | app->guest_cb (app->cb_cls, gconn, ego, &pmsg->place_pub_key, pmsg->place_state); | 983 | app->guest_cb (app->cb_cls, gconn, ego, &pmsg->place_pub_key, pmsg->place_state); |
984 | // GNUNET_free (gconn); // FIXME: is this correct here? apparently not! | 984 | GNUNET_free (gconn); |
985 | } | 985 | } |
986 | } | 986 | } |
987 | 987 | ||
@@ -1284,7 +1284,6 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn, | |||
1284 | plc->connect_msg = &hreq->header; | 1284 | plc->connect_msg = &hreq->header; |
1285 | place_send_connect_msg (plc); | 1285 | place_send_connect_msg (plc); |
1286 | 1286 | ||
1287 | GNUNET_free (hconn); | ||
1288 | return hst; | 1287 | return hst; |
1289 | } | 1288 | } |
1290 | 1289 | ||
@@ -1849,7 +1848,6 @@ GNUNET_SOCIAL_guest_enter_reconnect (struct GNUNET_SOCIAL_GuestConnection *gconn | |||
1849 | plc->connect_msg = &greq->header; | 1848 | plc->connect_msg = &greq->header; |
1850 | place_send_connect_msg (plc); | 1849 | place_send_connect_msg (plc); |
1851 | 1850 | ||
1852 | GNUNET_free (gconn); | ||
1853 | return gst; | 1851 | return gst; |
1854 | } | 1852 | } |
1855 | 1853 | ||
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) | |||
404 | { | 404 | { |
405 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 405 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
406 | "App connected: %p\n", cls); | 406 | "App connected: %p\n", cls); |
407 | if (NULL != core) | ||
408 | { | ||
409 | GNUNET_CORE_disconnect (core); | ||
410 | core = NULL; | ||
411 | } | ||
407 | } | 412 | } |
408 | 413 | ||
409 | 414 | ||
@@ -1269,12 +1274,6 @@ host_enter () | |||
1269 | static void | 1274 | static void |
1270 | id_host_created (void *cls, const char *emsg) | 1275 | id_host_created (void *cls, const char *emsg) |
1271 | { | 1276 | { |
1272 | if (NULL != core) | ||
1273 | { | ||
1274 | GNUNET_CORE_disconnect (core); | ||
1275 | core = NULL; | ||
1276 | } | ||
1277 | |||
1278 | if (NULL != emsg) | 1277 | if (NULL != emsg) |
1279 | { | 1278 | { |
1280 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1279 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |