diff options
author | Gabor X Toth <*@tg-x.net> | 2015-09-26 17:10:24 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2015-09-26 17:10:24 +0000 |
commit | 55ad4fa34348aaa05fadedeb830ea72cea5d7cc4 (patch) | |
tree | eb6c5df2f82ca43b26859b2bcc00746c28b1eb6b /src/multicast | |
parent | 0219647545ddc7c66dcab13414541cf57d792618 (diff) | |
download | gnunet-55ad4fa34348aaa05fadedeb830ea72cea5d7cc4.tar.gz gnunet-55ad4fa34348aaa05fadedeb830ea72cea5d7cc4.zip |
multicast: removed replay cancellation as responses are limited
Diffstat (limited to 'src/multicast')
-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 |
3 files changed, 4 insertions, 61 deletions
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 | ||