diff options
author | Gabor X Toth <*@tg-x.net> | 2015-09-26 17:10:17 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2015-09-26 17:10:17 +0000 |
commit | 0219647545ddc7c66dcab13414541cf57d792618 (patch) | |
tree | 40b99ee9f9b042828a28c7b27b22be4bf000f443 /src/multicast | |
parent | f5a9bac85b73508da6794e1171b857e2582c8216 (diff) | |
download | gnunet-0219647545ddc7c66dcab13414541cf57d792618.tar.gz gnunet-0219647545ddc7c66dcab13414541cf57d792618.zip |
multicast: removed membership test callback as clients check that already during join & replay
Diffstat (limited to 'src/multicast')
-rw-r--r-- | src/multicast/gnunet-service-multicast.c | 14 | ||||
-rw-r--r-- | src/multicast/multicast_api.c | 38 | ||||
-rw-r--r-- | src/multicast/test_multicast.c | 26 |
3 files changed, 2 insertions, 76 deletions
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index d197a3ef0..6d4d2cfa1 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -1384,17 +1384,6 @@ client_recv_replay_request_cancel (void *cls, struct GNUNET_SERVER_Client *clien | |||
1384 | 1384 | ||
1385 | 1385 | ||
1386 | /** | 1386 | /** |
1387 | * Incoming replay request from a client. | ||
1388 | */ | ||
1389 | static void | ||
1390 | client_recv_membership_test_result (void *cls, struct GNUNET_SERVER_Client *client, | ||
1391 | const struct GNUNET_MessageHeader *m) | ||
1392 | { | ||
1393 | struct Group *grp = GNUNET_SERVER_client_get_user_context (client, struct Group); | ||
1394 | } | ||
1395 | |||
1396 | |||
1397 | /** | ||
1398 | * A new client connected. | 1387 | * A new client connected. |
1399 | */ | 1388 | */ |
1400 | static void | 1389 | static void |
@@ -1436,9 +1425,6 @@ static const struct GNUNET_SERVER_MessageHandler server_handlers[] = { | |||
1436 | { client_recv_replay_response_end, NULL, | 1425 | { client_recv_replay_response_end, NULL, |
1437 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE_END, 0 }, | 1426 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE_END, 0 }, |
1438 | 1427 | ||
1439 | { client_recv_membership_test_result, NULL, | ||
1440 | GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT, 0 }, | ||
1441 | |||
1442 | { NULL, NULL, 0, 0 } | 1428 | { NULL, NULL, 0, 0 } |
1443 | }; | 1429 | }; |
1444 | 1430 | ||
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index aa6dd3d98..76c7fb004 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -81,7 +81,6 @@ struct GNUNET_MULTICAST_Group | |||
81 | struct GNUNET_MessageHeader *connect_msg; | 81 | struct GNUNET_MessageHeader *connect_msg; |
82 | 82 | ||
83 | GNUNET_MULTICAST_JoinRequestCallback join_req_cb; | 83 | GNUNET_MULTICAST_JoinRequestCallback join_req_cb; |
84 | GNUNET_MULTICAST_MembershipTestCallback member_test_cb; | ||
85 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb; | 84 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb; |
86 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb; | 85 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb; |
87 | GNUNET_MULTICAST_MessageCallback message_cb; | 86 | GNUNET_MULTICAST_MessageCallback message_cb; |
@@ -169,14 +168,6 @@ struct GNUNET_MULTICAST_JoinHandle | |||
169 | 168 | ||
170 | 169 | ||
171 | /** | 170 | /** |
172 | * Handle to pass back for the answer of a membership test. | ||
173 | */ | ||
174 | struct GNUNET_MULTICAST_MembershipTestHandle | ||
175 | { | ||
176 | }; | ||
177 | |||
178 | |||
179 | /** | ||
180 | * Opaque handle to a replay request from the multicast service. | 171 | * Opaque handle to a replay request from the multicast service. |
181 | */ | 172 | */ |
182 | struct GNUNET_MULTICAST_ReplayHandle | 173 | struct GNUNET_MULTICAST_ReplayHandle |
@@ -595,22 +586,6 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *join, | |||
595 | 586 | ||
596 | 587 | ||
597 | /** | 588 | /** |
598 | * Call informing multicast about the decision taken for a membership test. | ||
599 | * | ||
600 | * @param mth | ||
601 | * Handle that was given for the query. | ||
602 | * @param result | ||
603 | * #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a member, | ||
604 | * #GNUNET_SYSERR if we cannot answer the membership test. | ||
605 | */ | ||
606 | void | ||
607 | GNUNET_MULTICAST_membership_test_result (struct GNUNET_MULTICAST_MembershipTestHandle *mth, | ||
608 | int result) | ||
609 | { | ||
610 | } | ||
611 | |||
612 | |||
613 | /** | ||
614 | * Replay a message fragment for the multicast group. | 589 | * Replay a message fragment for the multicast group. |
615 | * | 590 | * |
616 | * @param rh | 591 | * @param rh |
@@ -722,8 +697,6 @@ GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
722 | * 0 for a new group. | 697 | * 0 for a new group. |
723 | * @param join_request_cb | 698 | * @param join_request_cb |
724 | * Function called to approve / disapprove joining of a peer. | 699 | * Function called to approve / disapprove joining of a peer. |
725 | * @param member_test_cb | ||
726 | * Function multicast can use to test group membership. | ||
727 | * @param replay_frag_cb | 700 | * @param replay_frag_cb |
728 | * Function that can be called to replay a message fragment. | 701 | * Function that can be called to replay a message fragment. |
729 | * @param replay_msg_cb | 702 | * @param replay_msg_cb |
@@ -744,7 +717,6 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
744 | const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key, | 717 | const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key, |
745 | uint64_t max_fragment_id, | 718 | uint64_t max_fragment_id, |
746 | GNUNET_MULTICAST_JoinRequestCallback join_request_cb, | 719 | GNUNET_MULTICAST_JoinRequestCallback join_request_cb, |
747 | GNUNET_MULTICAST_MembershipTestCallback member_test_cb, | ||
748 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, | 720 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, |
749 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, | 721 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, |
750 | GNUNET_MULTICAST_RequestCallback request_cb, | 722 | GNUNET_MULTICAST_RequestCallback request_cb, |
@@ -766,7 +738,6 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
766 | 738 | ||
767 | grp->cb_cls = cls; | 739 | grp->cb_cls = cls; |
768 | grp->join_req_cb = join_request_cb; | 740 | grp->join_req_cb = join_request_cb; |
769 | grp->member_test_cb = member_test_cb; | ||
770 | grp->replay_frag_cb = replay_frag_cb; | 741 | grp->replay_frag_cb = replay_frag_cb; |
771 | grp->replay_msg_cb = replay_msg_cb; | 742 | grp->replay_msg_cb = replay_msg_cb; |
772 | grp->message_cb = message_cb; | 743 | grp->message_cb = message_cb; |
@@ -917,9 +888,8 @@ GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginTransmitHan | |||
917 | * @a message_cb is invoked with a (failure) response and then with NULL. If | 888 | * @a message_cb is invoked with a (failure) response and then with NULL. If |
918 | * the join succeeds, outstanding (state) messages and ongoing multicast | 889 | * the join succeeds, outstanding (state) messages and ongoing multicast |
919 | * messages will be given to the @a message_cb until the member decides to part | 890 | * messages will be given to the @a message_cb until the member decides to part |
920 | * the group. The @a test_cb and @a replay_cb functions may be called at | 891 | * the group. The @a replay_cb function may be called at any time by the |
921 | * anytime by the multicast service to support relaying messages to other | 892 | * multicast service to support relaying messages to other members of the group. |
922 | * members of the group. | ||
923 | * | 893 | * |
924 | * @param cfg | 894 | * @param cfg |
925 | * Configuration to use. | 895 | * Configuration to use. |
@@ -944,8 +914,6 @@ GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginTransmitHan | |||
944 | * Function called to approve / disapprove joining of a peer. | 914 | * Function called to approve / disapprove joining of a peer. |
945 | * @param join_decision_cb | 915 | * @param join_decision_cb |
946 | * Function called to inform about the join decision. | 916 | * Function called to inform about the join decision. |
947 | * @param member_test_cb | ||
948 | * Function multicast can use to test group membership. | ||
949 | * @param replay_frag_cb | 917 | * @param replay_frag_cb |
950 | * Function that can be called to replay message fragments | 918 | * Function that can be called to replay message fragments |
951 | * this peer already knows from this group. NULL if this | 919 | * this peer already knows from this group. NULL if this |
@@ -973,7 +941,6 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
973 | const struct GNUNET_MessageHeader *join_msg, | 941 | const struct GNUNET_MessageHeader *join_msg, |
974 | GNUNET_MULTICAST_JoinRequestCallback join_request_cb, | 942 | GNUNET_MULTICAST_JoinRequestCallback join_request_cb, |
975 | GNUNET_MULTICAST_JoinDecisionCallback join_decision_cb, | 943 | GNUNET_MULTICAST_JoinDecisionCallback join_decision_cb, |
976 | GNUNET_MULTICAST_MembershipTestCallback member_test_cb, | ||
977 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, | 944 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, |
978 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, | 945 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, |
979 | GNUNET_MULTICAST_MessageCallback message_cb, | 946 | GNUNET_MULTICAST_MessageCallback message_cb, |
@@ -1003,7 +970,6 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1003 | 970 | ||
1004 | mem->join_dcsn_cb = join_decision_cb; | 971 | mem->join_dcsn_cb = join_decision_cb; |
1005 | grp->join_req_cb = join_request_cb; | 972 | grp->join_req_cb = join_request_cb; |
1006 | grp->member_test_cb = member_test_cb; | ||
1007 | grp->replay_frag_cb = replay_frag_cb; | 973 | grp->replay_frag_cb = replay_frag_cb; |
1008 | grp->replay_msg_cb = replay_msg_cb; | 974 | grp->replay_msg_cb = replay_msg_cb; |
1009 | grp->message_cb = message_cb; | 975 | grp->message_cb = message_cb; |
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c index d9b9ce0df..cc0616d6a 100644 --- a/src/multicast/test_multicast.c +++ b/src/multicast/test_multicast.c | |||
@@ -234,30 +234,6 @@ tmit_notify (void *cls, size_t *data_size, void *data) | |||
234 | 234 | ||
235 | 235 | ||
236 | static void | 236 | static void |
237 | origin_recv_membership_test (void *cls, | ||
238 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, | ||
239 | uint64_t message_id, | ||
240 | uint64_t group_generation, | ||
241 | struct GNUNET_MULTICAST_MembershipTestHandle *mth) | ||
242 | { | ||
243 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
244 | "Test #%u: origin_recv_membership_test()\n", test); | ||
245 | } | ||
246 | |||
247 | |||
248 | static void | ||
249 | member_recv_membership_test (void *cls, | ||
250 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, | ||
251 | uint64_t message_id, | ||
252 | uint64_t group_generation, | ||
253 | struct GNUNET_MULTICAST_MembershipTestHandle *mth) | ||
254 | { | ||
255 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
256 | "Test #%u: member_recv_membership_test()\n", test); | ||
257 | } | ||
258 | |||
259 | |||
260 | static void | ||
261 | member_recv_join_request (void *cls, | 237 | member_recv_join_request (void *cls, |
262 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, | 238 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, |
263 | const struct GNUNET_MessageHeader *join_msg, | 239 | const struct GNUNET_MessageHeader *join_msg, |
@@ -670,7 +646,6 @@ member_join (int t) | |||
670 | &this_peer, 1, &this_peer, join_req, | 646 | &this_peer, 1, &this_peer, join_req, |
671 | member_recv_join_request, | 647 | member_recv_join_request, |
672 | member_recv_join_decision, | 648 | member_recv_join_decision, |
673 | member_recv_membership_test, | ||
674 | member_recv_replay_frag, | 649 | member_recv_replay_frag, |
675 | member_recv_replay_msg, | 650 | member_recv_replay_msg, |
676 | member_recv_message, | 651 | member_recv_message, |
@@ -690,7 +665,6 @@ origin_start () | |||
690 | 665 | ||
691 | origin = GNUNET_MULTICAST_origin_start (cfg, group_key, 0, | 666 | origin = GNUNET_MULTICAST_origin_start (cfg, group_key, 0, |
692 | origin_recv_join_request, | 667 | origin_recv_join_request, |
693 | origin_recv_membership_test, | ||
694 | origin_recv_replay_frag, | 668 | origin_recv_replay_frag, |
695 | origin_recv_replay_msg, | 669 | origin_recv_replay_msg, |
696 | origin_recv_request, | 670 | origin_recv_request, |