* Is the client disconnected?
* #GNUNET_YES or #GNUNET_NO
*/
- uint8_t is_disconnected;
+ uint8_t is_disconnecting;
/**
* Is this a channel master (#GNUNET_YES), or slave (#GNUNET_NO)?
{
struct Channel *chn = &mst->channel;
- //if (NULL != mst->origin)
- // GNUNET_MULTICAST_origin_stop (mst->origin, cleanup_cb, cleanup_cls);
GNUNET_CONTAINER_multihashmap_destroy (mst->join_reqs);
GNUNET_CONTAINER_multihashmap_remove (masters, &chn->pub_key_hash, mst);
}
GNUNET_free (slv->relays);
slv->relays = NULL;
}
- //if (NULL != slv->member)
- //{
- // GNUNET_MULTICAST_member_part (slv->member, cleanup_cb, cleanup_cls);
- // slv->member = NULL;
- //}
GNUNET_CONTAINER_multihashmap_remove (slaves, &chn->pub_key_hash, slv);
}
chn,
(GNUNET_YES == chn->is_master) ? "master" : "slave",
GNUNET_h2s (&chn->pub_key_hash));
- chn->is_disconnected = GNUNET_YES;
+ chn->is_disconnecting = GNUNET_YES;
cleanup_channel (chn);
}
}
{
struct Client *c = cls;
+ c->channel->is_disconnecting = GNUNET_YES;
if (GNUNET_YES == c->channel->is_master)
{
struct Master *mst = (struct Master *) c->channel;
mst);
GNUNET_assert (NULL != mst->origin);
GNUNET_MULTICAST_origin_stop (mst->origin, channel_part_cb, c->client);
- mst->origin = NULL;
}
else
{
slv);
GNUNET_assert (NULL != slv->member);
GNUNET_MULTICAST_member_part (slv->member, channel_part_cb, c->client);
- slv->member = NULL;
}
GNUNET_SERVICE_client_continue (c->client);
}
{
GNUNET_SCHEDULER_add_now (&schedule_transmit_message, chn);
}
- else if (GNUNET_YES == chn->is_disconnected
+ else if (GNUNET_YES == chn->is_disconnecting
&& tmit_msg->last_ptype < GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END)
{
/* FIXME: handle partial message (when still in_transmit) */