aboutsummaryrefslogtreecommitdiff
path: root/src/multicast
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2015-09-26 17:10:10 +0000
committerGabor X Toth <*@tg-x.net>2015-09-26 17:10:10 +0000
commitf5a9bac85b73508da6794e1171b857e2582c8216 (patch)
treed754f5e560f85e80b2dca3ea73ff76ff2a1b8de4 /src/multicast
parente990039b4ddf89d37a8771dc5aca791e52df45ed (diff)
psyc fixes
Diffstat (limited to 'src/multicast')
-rw-r--r--src/multicast/gnunet-service-multicast.c15
-rw-r--r--src/multicast/multicast_api.c10
2 files changed, 12 insertions, 13 deletions
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c
index e7ee92cdfa..d197a3ef0f 100644
--- a/src/multicast/gnunet-service-multicast.c
+++ b/src/multicast/gnunet-service-multicast.c
@@ -509,7 +509,7 @@ client_notify_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%p User context is NULL in client_disconnect()\n", grp);
- GNUNET_assert (0);
+ GNUNET_break (0);
return;
}
@@ -969,7 +969,7 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client,
mem->join_dcsn,
GNUNET_NO);
}
- else if (grp->clients_head == grp->clients_tail)
+ else
{ /* First client of the group, send join request. */
struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1];
uint32_t relay_count = ntohl (msg->relay_count);
@@ -1042,16 +1042,7 @@ client_send_join_decision (struct Member *mem,
memcpy (mem->join_dcsn, dcsn, dcsn_size);
}
else
- { /* Refused entry, disconnect clients. */
-#if FIXME
- struct ClientList *cl = mem->grp.clients_head;
- while (NULL != cl)
- {
- struct GNUNET_SERVER_Client *client = cl->client;
- cl = cl->next;
- GNUNET_SERVER_client_disconnect (client);
- }
-#endif
+ { /* Refused entry, but replay would be still possible for past members. */
}
}
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c
index c437b71c94..aa6dd3d988 100644
--- a/src/multicast/multicast_api.c
+++ b/src/multicast/multicast_api.c
@@ -1033,12 +1033,19 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *mem,
GNUNET_ContinuationCallback part_cb,
void *part_cls)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%p Member parting.\n", mem);
struct GNUNET_MULTICAST_Group *grp = &mem->grp;
grp->is_disconnecting = GNUNET_YES;
grp->disconnect_cb = part_cb;
grp->disconnect_cls = part_cls;
+ mem->join_dcsn_cb = NULL;
+ grp->join_req_cb = NULL;
+ grp->message_cb = NULL;
+ grp->replay_msg_cb = NULL;
+ grp->replay_frag_cb = NULL;
+
GNUNET_CLIENT_MANAGER_disconnect (mem->grp.client, GNUNET_YES,
member_cleanup, mem);
}
@@ -1157,7 +1164,8 @@ member_to_origin (struct GNUNET_MULTICAST_Member *mem)
|| GNUNET_MULTICAST_FRAGMENT_MAX_SIZE < buf_size)
{
LOG (GNUNET_ERROR_TYPE_ERROR,
- "MemberTransmitNotify() returned error or invalid message size.\n");
+ "MemberTransmitNotify() returned error or invalid message size. "
+ "ret=%d, buf_size=%u\n", ret, buf_size);
/* FIXME: handle error */
GNUNET_free (req);
return;