From: Gabor X Toth <*@tg-x.net> Date: Thu, 12 May 2016 00:21:25 +0000 (+0000) Subject: psyc/social: transmit fix X-Git-Tag: initial-import-from-subversion-38251~887 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ced7c72a9acfe9c99b4d2f07bb81e11a1a23707;p=oweals%2Fgnunet.git psyc/social: transmit fix --- diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index bd81dabb1..dc5697a07 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c @@ -2068,10 +2068,13 @@ master_transmit_message (struct Master *mst) return; if (NULL == mst->tmit_handle) { - mst->tmit_handle - = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id, - mst->max_group_generation, - master_transmit_notify, mst); + mst->tmit_handle = (void *) &mst->tmit_handle; + struct GNUNET_MULTICAST_OriginTransmitHandle * + tmit_handle = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id, + mst->max_group_generation, + master_transmit_notify, mst); + if (NULL != mst->tmit_handle) + mst->tmit_handle = tmit_handle; } else { @@ -2090,9 +2093,12 @@ slave_transmit_message (struct Slave *slv) return; if (NULL == slv->tmit_handle) { - slv->tmit_handle - = GNUNET_MULTICAST_member_to_origin (slv->member, slv->chn.tmit_head->id, - slave_transmit_notify, slv); + slv->tmit_handle = (void *) &slv->tmit_handle; + struct GNUNET_MULTICAST_MemberTransmitHandle * + tmit_handle = GNUNET_MULTICAST_member_to_origin (slv->member, slv->chn.tmit_head->id, + slave_transmit_notify, slv); + if (NULL != slv->tmit_handle) + slv->tmit_handle = tmit_handle; } else { diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 8dd51e610..c379ff76b 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c @@ -2666,11 +2666,14 @@ psyc_master_transmit_message (struct Host *hst) if (NULL == pmeth) return GNUNET_SYSERR; - hst->tmit_handle - = GNUNET_PSYC_master_transmit (hst->master, (const char *) &pmeth[1], - &host_transmit_notify_mod, - &host_transmit_notify_data, hst, - pmeth->flags); + hst->tmit_handle = (void *) &hst->tmit_handle; + struct GNUNET_PSYC_MasterTransmitHandle * + tmit_handle = GNUNET_PSYC_master_transmit (hst->master, (const char *) &pmeth[1], + &host_transmit_notify_mod, + &host_transmit_notify_data, hst, + pmeth->flags); + if (NULL != hst->tmit_handle) + hst->tmit_handle = tmit_handle; GNUNET_free (pmeth); } else @@ -2696,11 +2699,14 @@ psyc_slave_transmit_message (struct Guest *gst) if (NULL == pmeth) return GNUNET_SYSERR; - gst->tmit_handle - = GNUNET_PSYC_slave_transmit (gst->slave, (const char *) &pmeth[1], - &guest_transmit_notify_mod, - &guest_transmit_notify_data, gst, - pmeth->flags); + gst->tmit_handle = (void *) &gst->tmit_handle; + struct GNUNET_PSYC_SlaveTransmitHandle * + tmit_handle = GNUNET_PSYC_slave_transmit (gst->slave, (const char *) &pmeth[1], + &guest_transmit_notify_mod, + &guest_transmit_notify_data, gst, + pmeth->flags); + if (NULL != gst->tmit_handle) + gst->tmit_handle = tmit_handle; GNUNET_free (pmeth); } else diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index fcf75d595..9e69208b5 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c @@ -227,7 +227,7 @@ exit_success () GNUNET_SCHEDULER_cancel (timeout_task); timeout_task = NULL; } - GNUNET_SCHEDULER_add_now (schedule_success, NULL); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, schedule_success, NULL); } @@ -239,7 +239,7 @@ exit_fail () GNUNET_SCHEDULER_cancel (timeout_task); timeout_task = NULL; } - GNUNET_SCHEDULER_add_now (schedule_fail, NULL); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, schedule_fail, NULL); }