[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36375 - in gnunet/src: include multicast psyc
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36375 - in gnunet/src: include multicast psyc |
Date: |
Sat, 26 Sep 2015 19:10:18 +0200 |
Author: tg
Date: 2015-09-26 19:10:17 +0200 (Sat, 26 Sep 2015)
New Revision: 36375
Modified:
gnunet/src/include/gnunet_multicast_service.h
gnunet/src/multicast/gnunet-service-multicast.c
gnunet/src/multicast/multicast_api.c
gnunet/src/multicast/test_multicast.c
gnunet/src/psyc/gnunet-service-psyc.c
Log:
multicast: removed membership test callback as clients check that already
during join & replay
Modified: gnunet/src/include/gnunet_multicast_service.h
===================================================================
--- gnunet/src/include/gnunet_multicast_service.h 2015-09-26 17:10:10 UTC
(rev 36374)
+++ gnunet/src/include/gnunet_multicast_service.h 2015-09-26 17:10:17 UTC
(rev 36375)
@@ -326,53 +326,6 @@
/**
- * Handle to pass back for the answer of a membership test.
- */
-struct GNUNET_MULTICAST_MembershipTestHandle;
-
-
-/**
- * Call informing multicast about the decision taken for a membership test.
- *
- * @param mth
- * Handle that was given for the query.
- * @param result
- * #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a
member,
- * #GNUNET_SYSERR if we cannot answer the membership test.
- */
-void
-GNUNET_MULTICAST_membership_test_result (struct
GNUNET_MULTICAST_MembershipTestHandle *mth,
- int result);
-
-
-/**
- * Method called to test if a member was in the group at a particular time.
- *
- * It is called when a replay request is received to determine if the requested
- * message can be replayed.
- *
- * @param cls
- * Closure.
- * @param member_key
- * Identity of the member that we want to test.
- * @param message_id
- * Message ID for which to perform the test.
- * @param group_generation
- * Group generation of the message. It has relevance if
- * the message consists of multiple fragments with different group
- * generations.
- * @param mth
- * Handle to give to GNUNET_MULTICAST_membership_test_answer().
- */
-typedef void
-(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls,
- const struct
GNUNET_CRYPTO_EcdsaPublicKey *member_key,
- uint64_t message_id,
- uint64_t group_generation,
- struct
GNUNET_MULTICAST_MembershipTestHandle *mth);
-
-
-/**
* Function called whenever a group member has transmitted a request
* to the origin (other than joining or leaving).
*
@@ -619,8 +572,6 @@
* 0 for a new group.
* @param join_request_cb
* Function called to approve / disapprove joining of a peer.
- * @param member_test_cb
- * Function multicast can use to test group membership.
* @param replay_frag_cb
* Function that can be called to replay a message fragment.
* @param replay_msg_cb
@@ -641,7 +592,6 @@
const struct GNUNET_CRYPTO_EddsaPrivateKey
*priv_key,
uint64_t max_fragment_id,
GNUNET_MULTICAST_JoinRequestCallback
join_request_cb,
- GNUNET_MULTICAST_MembershipTestCallback
member_test_cb,
GNUNET_MULTICAST_ReplayFragmentCallback
replay_frag_cb,
GNUNET_MULTICAST_ReplayMessageCallback
replay_msg_cb,
GNUNET_MULTICAST_RequestCallback request_cb,
@@ -774,8 +724,6 @@
* Function called to approve / disapprove joining of a peer.
* @param join_decision_cb
* Function called to inform about the join decision.
- * @param member_test_cb
- * Function multicast can use to test group membership.
* @param replay_frag_cb
* Function that can be called to replay message fragments
* this peer already knows from this group. NULL if this
@@ -803,7 +751,6 @@
const struct GNUNET_MessageHeader *join_request,
GNUNET_MULTICAST_JoinRequestCallback
join_request_cb,
GNUNET_MULTICAST_JoinDecisionCallback
join_decision_cb,
- GNUNET_MULTICAST_MembershipTestCallback
mem_test_cb,
GNUNET_MULTICAST_ReplayFragmentCallback
replay_frag_cb,
GNUNET_MULTICAST_ReplayMessageCallback
replay_msg_cb,
GNUNET_MULTICAST_MessageCallback message_cb,
Modified: gnunet/src/multicast/gnunet-service-multicast.c
===================================================================
--- gnunet/src/multicast/gnunet-service-multicast.c 2015-09-26 17:10:10 UTC
(rev 36374)
+++ gnunet/src/multicast/gnunet-service-multicast.c 2015-09-26 17:10:17 UTC
(rev 36375)
@@ -1384,17 +1384,6 @@
/**
- * Incoming replay request from a client.
- */
-static void
-client_recv_membership_test_result (void *cls, struct GNUNET_SERVER_Client
*client,
- const struct GNUNET_MessageHeader *m)
-{
- struct Group *grp = GNUNET_SERVER_client_get_user_context (client, struct
Group);
-}
-
-
-/**
* A new client connected.
*/
static void
@@ -1436,9 +1425,6 @@
{ client_recv_replay_response_end, NULL,
GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE_END, 0 },
- { client_recv_membership_test_result, NULL,
- GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT, 0 },
-
{ NULL, NULL, 0, 0 }
};
Modified: gnunet/src/multicast/multicast_api.c
===================================================================
--- gnunet/src/multicast/multicast_api.c 2015-09-26 17:10:10 UTC (rev
36374)
+++ gnunet/src/multicast/multicast_api.c 2015-09-26 17:10:17 UTC (rev
36375)
@@ -81,7 +81,6 @@
struct GNUNET_MessageHeader *connect_msg;
GNUNET_MULTICAST_JoinRequestCallback join_req_cb;
- GNUNET_MULTICAST_MembershipTestCallback member_test_cb;
GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb;
GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb;
GNUNET_MULTICAST_MessageCallback message_cb;
@@ -169,14 +168,6 @@
/**
- * Handle to pass back for the answer of a membership test.
- */
-struct GNUNET_MULTICAST_MembershipTestHandle
-{
-};
-
-
-/**
* Opaque handle to a replay request from the multicast service.
*/
struct GNUNET_MULTICAST_ReplayHandle
@@ -595,22 +586,6 @@
/**
- * Call informing multicast about the decision taken for a membership test.
- *
- * @param mth
- * Handle that was given for the query.
- * @param result
- * #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a
member,
- * #GNUNET_SYSERR if we cannot answer the membership test.
- */
-void
-GNUNET_MULTICAST_membership_test_result (struct
GNUNET_MULTICAST_MembershipTestHandle *mth,
- int result)
-{
-}
-
-
-/**
* Replay a message fragment for the multicast group.
*
* @param rh
@@ -722,8 +697,6 @@
* 0 for a new group.
* @param join_request_cb
* Function called to approve / disapprove joining of a peer.
- * @param member_test_cb
- * Function multicast can use to test group membership.
* @param replay_frag_cb
* Function that can be called to replay a message fragment.
* @param replay_msg_cb
@@ -744,7 +717,6 @@
const struct GNUNET_CRYPTO_EddsaPrivateKey
*priv_key,
uint64_t max_fragment_id,
GNUNET_MULTICAST_JoinRequestCallback
join_request_cb,
- GNUNET_MULTICAST_MembershipTestCallback
member_test_cb,
GNUNET_MULTICAST_ReplayFragmentCallback
replay_frag_cb,
GNUNET_MULTICAST_ReplayMessageCallback
replay_msg_cb,
GNUNET_MULTICAST_RequestCallback request_cb,
@@ -766,7 +738,6 @@
grp->cb_cls = cls;
grp->join_req_cb = join_request_cb;
- grp->member_test_cb = member_test_cb;
grp->replay_frag_cb = replay_frag_cb;
grp->replay_msg_cb = replay_msg_cb;
grp->message_cb = message_cb;
@@ -917,9 +888,8 @@
* @a message_cb is invoked with a (failure) response and then with NULL. If
* the join succeeds, outstanding (state) messages and ongoing multicast
* messages will be given to the @a message_cb until the member decides to part
- * the group. The @a test_cb and @a replay_cb functions may be called at
- * anytime by the multicast service to support relaying messages to other
- * members of the group.
+ * the group. The @a replay_cb function may be called at any time by the
+ * multicast service to support relaying messages to other members of the
group.
*
* @param cfg
* Configuration to use.
@@ -944,8 +914,6 @@
* Function called to approve / disapprove joining of a peer.
* @param join_decision_cb
* Function called to inform about the join decision.
- * @param member_test_cb
- * Function multicast can use to test group membership.
* @param replay_frag_cb
* Function that can be called to replay message fragments
* this peer already knows from this group. NULL if this
@@ -973,7 +941,6 @@
const struct GNUNET_MessageHeader *join_msg,
GNUNET_MULTICAST_JoinRequestCallback
join_request_cb,
GNUNET_MULTICAST_JoinDecisionCallback
join_decision_cb,
- GNUNET_MULTICAST_MembershipTestCallback
member_test_cb,
GNUNET_MULTICAST_ReplayFragmentCallback
replay_frag_cb,
GNUNET_MULTICAST_ReplayMessageCallback
replay_msg_cb,
GNUNET_MULTICAST_MessageCallback message_cb,
@@ -1003,7 +970,6 @@
mem->join_dcsn_cb = join_decision_cb;
grp->join_req_cb = join_request_cb;
- grp->member_test_cb = member_test_cb;
grp->replay_frag_cb = replay_frag_cb;
grp->replay_msg_cb = replay_msg_cb;
grp->message_cb = message_cb;
Modified: gnunet/src/multicast/test_multicast.c
===================================================================
--- gnunet/src/multicast/test_multicast.c 2015-09-26 17:10:10 UTC (rev
36374)
+++ gnunet/src/multicast/test_multicast.c 2015-09-26 17:10:17 UTC (rev
36375)
@@ -234,30 +234,6 @@
static void
-origin_recv_membership_test (void *cls,
- const struct GNUNET_CRYPTO_EcdsaPublicKey
*member_key,
- uint64_t message_id,
- uint64_t group_generation,
- struct GNUNET_MULTICAST_MembershipTestHandle *mth)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Test #%u: origin_recv_membership_test()\n", test);
-}
-
-
-static void
-member_recv_membership_test (void *cls,
- const struct GNUNET_CRYPTO_EcdsaPublicKey
*member_key,
- uint64_t message_id,
- uint64_t group_generation,
- struct GNUNET_MULTICAST_MembershipTestHandle *mth)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Test #%u: member_recv_membership_test()\n", test);
-}
-
-
-static void
member_recv_join_request (void *cls,
const struct GNUNET_CRYPTO_EcdsaPublicKey
*member_key,
const struct GNUNET_MessageHeader *join_msg,
@@ -670,7 +646,6 @@
&this_peer, 1, &this_peer, join_req,
member_recv_join_request,
member_recv_join_decision,
- member_recv_membership_test,
member_recv_replay_frag,
member_recv_replay_msg,
member_recv_message,
@@ -690,7 +665,6 @@
origin = GNUNET_MULTICAST_origin_start (cfg, group_key, 0,
origin_recv_join_request,
- origin_recv_membership_test,
origin_recv_replay_frag,
origin_recv_replay_msg,
origin_recv_request,
Modified: gnunet/src/psyc/gnunet-service-psyc.c
===================================================================
--- gnunet/src/psyc/gnunet-service-psyc.c 2015-09-26 17:10:10 UTC (rev
36374)
+++ gnunet/src/psyc/gnunet-service-psyc.c 2015-09-26 17:10:17 UTC (rev
36375)
@@ -826,41 +826,6 @@
}
-/**
- * Received result of GNUNET_PSYCSTORE_membership_test()
- */
-static void
-store_recv_membership_test_result (void *cls, int64_t result,
- const char *err_msg, uint16_t err_msg_size)
-{
- struct GNUNET_MULTICAST_MembershipTestHandle *mth = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "%p GNUNET_PSYCSTORE_membership_test() returned %" PRId64 "
(%.*s)\n",
- mth, result, err_msg_size, err_msg);
-
- GNUNET_MULTICAST_membership_test_result (mth, result);
-}
-
-
-/**
- * Incoming membership test request from multicast.
- */
-static void
-mcast_recv_membership_test (void *cls,
- const struct GNUNET_CRYPTO_EcdsaPublicKey
*slave_key,
- uint64_t message_id, uint64_t group_generation,
- struct GNUNET_MULTICAST_MembershipTestHandle *mth)
-{
- struct Channel *chn = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "%p Received membership test request from multicast.\n",
- mth);
- GNUNET_PSYCSTORE_membership_test (store, &chn->pub_key, slave_key,
- message_id, group_generation,
- &store_recv_membership_test_result, mth);
-}
-
-
static int
store_recv_fragment_replay (void *cls,
struct GNUNET_MULTICAST_MessageHeader *msg,
@@ -1617,7 +1582,6 @@
mst->origin
= GNUNET_MULTICAST_origin_start (cfg, &mst->priv_key, max_fragment_id,
mcast_recv_join_request,
- mcast_recv_membership_test,
mcast_recv_replay_fragment,
mcast_recv_replay_message,
mcast_recv_request,
@@ -1665,7 +1629,6 @@
&slv->join_msg->header,
mcast_recv_join_request,
mcast_recv_join_decision,
- mcast_recv_membership_test,
mcast_recv_replay_fragment,
mcast_recv_replay_message,
mcast_recv_message, chn);
@@ -1870,7 +1833,6 @@
&slv->join_msg->header,
&mcast_recv_join_request,
&mcast_recv_join_decision,
- &mcast_recv_membership_test,
&mcast_recv_replay_fragment,
&mcast_recv_replay_message,
&mcast_recv_message, chn);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36375 - in gnunet/src: include multicast psyc,
gnunet <=