diff options
author | Gabor X Toth <*@tg-x.net> | 2015-09-05 23:44:08 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2015-09-05 23:44:08 +0000 |
commit | 878b09fe6521df37c2d39f884a6c892b370473a5 (patch) | |
tree | accd38e3a5fb995546508ffb081d0f9f9fc850a0 /src/multicast | |
parent | 5e4dfeb7fb48a506f25af0c206ee65a5f7de7f58 (diff) | |
download | gnunet-878b09fe6521df37c2d39f884a6c892b370473a5.tar.gz gnunet-878b09fe6521df37c2d39f884a6c892b370473a5.zip |
multicast, psyc, psycstore, client_manager fixes
Diffstat (limited to 'src/multicast')
-rw-r--r-- | src/multicast/gnunet-service-multicast.c | 8 | ||||
-rw-r--r-- | src/multicast/multicast_api.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index afd5102ec..a9b15cef1 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -788,9 +788,11 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client, | |||
788 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 788 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
789 | "%p Client connected to group %s..\n", | 789 | "%p Client connected to group %s..\n", |
790 | mem, GNUNET_h2s (&grp->pub_key_hash)); | 790 | mem, GNUNET_h2s (&grp->pub_key_hash)); |
791 | char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&mem->pub_key); | ||
791 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 792 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
792 | "%p ..as member %s.\n", | 793 | "%p ..as member %s (%s).\n", |
793 | mem, GNUNET_h2s (&mem_pub_key_hash)); | 794 | mem, GNUNET_h2s (&mem->pub_key_hash), str); |
795 | GNUNET_free (str); | ||
794 | 796 | ||
795 | GNUNET_SERVER_client_set_user_context (client, grp); | 797 | GNUNET_SERVER_client_set_user_context (client, grp); |
796 | 798 | ||
@@ -833,6 +835,7 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client, | |||
833 | if (0 < join_msg_size) | 835 | if (0 < join_msg_size) |
834 | memcpy (&req[1], join_msg, join_msg_size); | 836 | memcpy (&req[1], join_msg, join_msg_size); |
835 | 837 | ||
838 | req->member_key = mem->pub_key; | ||
836 | req->purpose.size = htonl (msg_size | 839 | req->purpose.size = htonl (msg_size |
837 | - sizeof (req->header) | 840 | - sizeof (req->header) |
838 | - sizeof (req->reserved) | 841 | - sizeof (req->reserved) |
@@ -1000,6 +1003,7 @@ client_recv_multicast_request (void *cls, struct GNUNET_SERVER_Client *client, | |||
1000 | /* FIXME: yucky, should use separate message structs for P2P and CS! */ | 1003 | /* FIXME: yucky, should use separate message structs for P2P and CS! */ |
1001 | out = (struct GNUNET_MULTICAST_RequestHeader *) GNUNET_copy_message (m); | 1004 | out = (struct GNUNET_MULTICAST_RequestHeader *) GNUNET_copy_message (m); |
1002 | 1005 | ||
1006 | out->member_key = mem->pub_key; | ||
1003 | out->fragment_id = GNUNET_ntohll (++mem->max_fragment_id); | 1007 | out->fragment_id = GNUNET_ntohll (++mem->max_fragment_id); |
1004 | out->purpose.size = htonl (ntohs (out->header.size) | 1008 | out->purpose.size = htonl (ntohs (out->header.size) |
1005 | - sizeof (out->header) | 1009 | - sizeof (out->header) |
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index ce663542d..5cd729203 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -267,7 +267,7 @@ group_recv_message (void *cls, | |||
267 | "Calling message callback with a message of size %u.\n", | 267 | "Calling message callback with a message of size %u.\n", |
268 | ntohs (mmsg->header.size)); | 268 | ntohs (mmsg->header.size)); |
269 | 269 | ||
270 | if (NULL != grp->message_cb) | 270 | if (GNUNET_YES != grp->is_disconnecting && NULL != grp->message_cb) |
271 | grp->message_cb (grp->cb_cls, mmsg); | 271 | grp->message_cb (grp->cb_cls, mmsg); |
272 | } | 272 | } |
273 | 273 | ||
@@ -848,7 +848,7 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *mem, | |||
848 | grp->disconnect_cls = part_cls; | 848 | grp->disconnect_cls = part_cls; |
849 | 849 | ||
850 | GNUNET_CLIENT_MANAGER_disconnect (mem->grp.client, GNUNET_YES, | 850 | GNUNET_CLIENT_MANAGER_disconnect (mem->grp.client, GNUNET_YES, |
851 | &member_cleanup, mem); | 851 | member_cleanup, mem); |
852 | } | 852 | } |
853 | 853 | ||
854 | 854 | ||