diff options
-rw-r--r-- | src/include/gnunet_multicast_service.h | 29 | ||||
-rw-r--r-- | src/multicast/gnunet-service-multicast.c | 30 | ||||
-rw-r--r-- | src/multicast/multicast_api.c | 31 | ||||
-rw-r--r-- | src/multicast/test_multicast.c | 4 |
4 files changed, 6 insertions, 88 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 056cfa642..5503eb3a9 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -377,19 +377,6 @@ typedef void | |||
377 | 377 | ||
378 | 378 | ||
379 | /** | 379 | /** |
380 | * Function called with the result of an asynchronous operation. | ||
381 | * | ||
382 | * @see GNUNET_MULTICAST_replay_fragment() | ||
383 | * | ||
384 | * @param result | ||
385 | * Result of the operation. | ||
386 | */ | ||
387 | typedef void | ||
388 | (*GNUNET_MULTICAST_ResultCallback) (void *cls, | ||
389 | int result); | ||
390 | |||
391 | |||
392 | /** | ||
393 | * Opaque handle to a replay request from the multicast service. | 380 | * Opaque handle to a replay request from the multicast service. |
394 | */ | 381 | */ |
395 | struct GNUNET_MULTICAST_ReplayHandle; | 382 | struct GNUNET_MULTICAST_ReplayHandle; |
@@ -775,19 +762,13 @@ struct GNUNET_MULTICAST_MemberReplayHandle; | |||
775 | * @param flags | 762 | * @param flags |
776 | * Additional flags for the replay request. | 763 | * Additional flags for the replay request. |
777 | * It is used and defined by GNUNET_MULTICAST_ReplayFragmentCallback | 764 | * It is used and defined by GNUNET_MULTICAST_ReplayFragmentCallback |
778 | * @param result_cb | ||
779 | * Function to call when the replayed message fragment arrives. | ||
780 | * @param result_cls | ||
781 | * Closure for @a result_cb. | ||
782 | * | 765 | * |
783 | * @return Replay request handle, NULL on error. | 766 | * @return Replay request handle, NULL on error. |
784 | */ | 767 | */ |
785 | struct GNUNET_MULTICAST_MemberReplayHandle * | 768 | struct GNUNET_MULTICAST_MemberReplayHandle * |
786 | GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member, | 769 | GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member, |
787 | uint64_t fragment_id, | 770 | uint64_t fragment_id, |
788 | uint64_t flags, | 771 | uint64_t flags); |
789 | GNUNET_MULTICAST_ResultCallback result_cb, | ||
790 | void *result_cb_cls); | ||
791 | 772 | ||
792 | 773 | ||
793 | /** | 774 | /** |
@@ -805,10 +786,6 @@ GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member, | |||
805 | * @param flags | 786 | * @param flags |
806 | * Additional flags for the replay request. | 787 | * Additional flags for the replay request. |
807 | * It is used & defined by GNUNET_MULTICAST_ReplayMessageCallback | 788 | * It is used & defined by GNUNET_MULTICAST_ReplayMessageCallback |
808 | * @param result_cb | ||
809 | * Function to call for each replayed message fragment. | ||
810 | * @param result_cls | ||
811 | * Closure for @a result_cb. | ||
812 | * | 789 | * |
813 | * @return Replay request handle, NULL on error. | 790 | * @return Replay request handle, NULL on error. |
814 | */ | 791 | */ |
@@ -816,9 +793,7 @@ struct GNUNET_MULTICAST_MemberReplayHandle * | |||
816 | GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *member, | 793 | GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *member, |
817 | uint64_t message_id, | 794 | uint64_t message_id, |
818 | uint64_t fragment_offset, | 795 | uint64_t fragment_offset, |
819 | uint64_t flags, | 796 | uint64_t flags); |
820 | GNUNET_MULTICAST_ResultCallback result_cb, | ||
821 | void *result_cb_cls); | ||
822 | 797 | ||
823 | 798 | ||
824 | /** | 799 | /** |
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index 6d4d2cfa1..9ebfa66da 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -1373,17 +1373,6 @@ client_recv_replay_response (void *cls, struct GNUNET_SERVER_Client *client, | |||
1373 | 1373 | ||
1374 | 1374 | ||
1375 | /** | 1375 | /** |
1376 | * Incoming replay request from a client. | ||
1377 | */ | ||
1378 | static void | ||
1379 | client_recv_replay_request_cancel (void *cls, struct GNUNET_SERVER_Client *client, | ||
1380 | const struct GNUNET_MessageHeader *m) | ||
1381 | { | ||
1382 | struct Group *grp = GNUNET_SERVER_client_get_user_context (client, struct Group); | ||
1383 | } | ||
1384 | |||
1385 | |||
1386 | /** | ||
1387 | * A new client connected. | 1376 | * A new client connected. |
1388 | */ | 1377 | */ |
1389 | static void | 1378 | static void |
@@ -1416,9 +1405,6 @@ static const struct GNUNET_SERVER_MessageHandler server_handlers[] = { | |||
1416 | { client_recv_replay_request, NULL, | 1405 | { client_recv_replay_request, NULL, |
1417 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, 0 }, | 1406 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, 0 }, |
1418 | 1407 | ||
1419 | { client_recv_replay_request_cancel, NULL, | ||
1420 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL, 0 }, | ||
1421 | |||
1422 | { client_recv_replay_response, NULL, | 1408 | { client_recv_replay_response, NULL, |
1423 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, 0 }, | 1409 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, 0 }, |
1424 | 1410 | ||
@@ -1722,19 +1708,6 @@ cadet_recv_replay_request (void *cls, | |||
1722 | 1708 | ||
1723 | 1709 | ||
1724 | /** | 1710 | /** |
1725 | * Incoming multicast replay request cancellation from CADET. | ||
1726 | */ | ||
1727 | int | ||
1728 | cadet_recv_replay_request_cancel (void *cls, | ||
1729 | struct GNUNET_CADET_Channel *channel, | ||
1730 | void **ctx, | ||
1731 | const struct GNUNET_MessageHeader *m) | ||
1732 | { | ||
1733 | |||
1734 | } | ||
1735 | |||
1736 | |||
1737 | /** | ||
1738 | * Incoming multicast replay response from CADET. | 1711 | * Incoming multicast replay response from CADET. |
1739 | */ | 1712 | */ |
1740 | int | 1713 | int |
@@ -1767,9 +1740,6 @@ static const struct GNUNET_CADET_MessageHandler cadet_handlers[] = { | |||
1767 | { cadet_recv_replay_request, | 1740 | { cadet_recv_replay_request, |
1768 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, 0 }, | 1741 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST, 0 }, |
1769 | 1742 | ||
1770 | { cadet_recv_replay_request_cancel, | ||
1771 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL, 0 }, | ||
1772 | |||
1773 | { cadet_recv_replay_response, | 1743 | { cadet_recv_replay_response, |
1774 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, 0 }, | 1744 | GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE, 0 }, |
1775 | 1745 | ||
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index 76c7fb004..117a0efe2 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -182,9 +182,6 @@ struct GNUNET_MULTICAST_ReplayHandle | |||
182 | */ | 182 | */ |
183 | struct GNUNET_MULTICAST_MemberReplayHandle | 183 | struct GNUNET_MULTICAST_MemberReplayHandle |
184 | { | 184 | { |
185 | |||
186 | GNUNET_MULTICAST_ResultCallback result_cb; | ||
187 | void *result_cls; | ||
188 | }; | 185 | }; |
189 | 186 | ||
190 | 187 | ||
@@ -1051,19 +1048,13 @@ member_replay_request (struct GNUNET_MULTICAST_Member *mem, | |||
1051 | * @param flags | 1048 | * @param flags |
1052 | * Additional flags for the replay request. | 1049 | * Additional flags for the replay request. |
1053 | * It is used and defined by GNUNET_MULTICAST_ReplayFragmentCallback | 1050 | * It is used and defined by GNUNET_MULTICAST_ReplayFragmentCallback |
1054 | * @param result_cb | ||
1055 | * Function to call when the replayed message fragment arrives. | ||
1056 | * @param result_cls | ||
1057 | * Closure for @a result_cb. | ||
1058 | * | 1051 | * |
1059 | * @return Replay request handle. | 1052 | * @return Replay request handle. |
1060 | */ | 1053 | */ |
1061 | struct GNUNET_MULTICAST_MemberReplayHandle * | 1054 | struct GNUNET_MULTICAST_MemberReplayHandle * |
1062 | GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *mem, | 1055 | GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *mem, |
1063 | uint64_t fragment_id, | 1056 | uint64_t fragment_id, |
1064 | uint64_t flags, | 1057 | uint64_t flags) |
1065 | GNUNET_MULTICAST_ResultCallback result_cb, | ||
1066 | void *result_cls) | ||
1067 | { | 1058 | { |
1068 | member_replay_request (mem, fragment_id, 0, 0, flags); | 1059 | member_replay_request (mem, fragment_id, 0, 0, flags); |
1069 | } | 1060 | } |
@@ -1084,10 +1075,6 @@ GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *mem, | |||
1084 | * @param flags | 1075 | * @param flags |
1085 | * Additional flags for the replay request. | 1076 | * Additional flags for the replay request. |
1086 | * It is used & defined by GNUNET_MULTICAST_ReplayMessageCallback | 1077 | * It is used & defined by GNUNET_MULTICAST_ReplayMessageCallback |
1087 | * @param result_cb | ||
1088 | * Function to call for each replayed message fragment. | ||
1089 | * @param result_cls | ||
1090 | * Closure for @a result_cb. | ||
1091 | * | 1078 | * |
1092 | * @return Replay request handle, NULL on error. | 1079 | * @return Replay request handle, NULL on error. |
1093 | */ | 1080 | */ |
@@ -1095,26 +1082,12 @@ struct GNUNET_MULTICAST_MemberReplayHandle * | |||
1095 | GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *mem, | 1082 | GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *mem, |
1096 | uint64_t message_id, | 1083 | uint64_t message_id, |
1097 | uint64_t fragment_offset, | 1084 | uint64_t fragment_offset, |
1098 | uint64_t flags, | 1085 | uint64_t flags) |
1099 | GNUNET_MULTICAST_ResultCallback result_cb, | ||
1100 | void *result_cls) | ||
1101 | { | 1086 | { |
1102 | member_replay_request (mem, 0, message_id, fragment_offset, flags); | 1087 | member_replay_request (mem, 0, message_id, fragment_offset, flags); |
1103 | } | 1088 | } |
1104 | 1089 | ||
1105 | 1090 | ||
1106 | /** | ||
1107 | * Cancel a replay request. | ||
1108 | * | ||
1109 | * @param rh | ||
1110 | * Request to cancel. | ||
1111 | */ | ||
1112 | void | ||
1113 | GNUNET_MULTICAST_member_replay_cancel (struct GNUNET_MULTICAST_MemberReplayHandle *rh) | ||
1114 | { | ||
1115 | } | ||
1116 | |||
1117 | |||
1118 | static void | 1091 | static void |
1119 | member_to_origin (struct GNUNET_MULTICAST_Member *mem) | 1092 | member_to_origin (struct GNUNET_MULTICAST_Member *mem) |
1120 | { | 1093 | { |
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c index cc0616d6a..a5946f3fd 100644 --- a/src/multicast/test_multicast.c +++ b/src/multicast/test_multicast.c | |||
@@ -317,7 +317,7 @@ member_replay_ok () | |||
317 | replay_fragment_id = 1; | 317 | replay_fragment_id = 1; |
318 | replay_flags = 1 | 1<<11; | 318 | replay_flags = 1 | 1<<11; |
319 | GNUNET_MULTICAST_member_replay_fragment (member, replay_fragment_id, | 319 | GNUNET_MULTICAST_member_replay_fragment (member, replay_fragment_id, |
320 | replay_flags, NULL, NULL); | 320 | replay_flags); |
321 | } | 321 | } |
322 | 322 | ||
323 | 323 | ||
@@ -330,7 +330,7 @@ member_replay_error () | |||
330 | replay_fragment_id = 1234; | 330 | replay_fragment_id = 1234; |
331 | replay_flags = 11 | 1<<11; | 331 | replay_flags = 11 | 1<<11; |
332 | GNUNET_MULTICAST_member_replay_fragment (member, replay_fragment_id, | 332 | GNUNET_MULTICAST_member_replay_fragment (member, replay_fragment_id, |
333 | replay_flags, NULL, NULL); | 333 | replay_flags); |
334 | } | 334 | } |
335 | 335 | ||
336 | 336 | ||