diff options
author | t3sserakt <t3ss@posteo.de> | 2020-10-15 08:36:32 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-10-15 08:37:01 +0200 |
commit | 2c529c7009239b4c9068069bb63f3978a9a41b1a (patch) | |
tree | aeeb94d8f3cd611fa3088ebffd688a79b94c30bc | |
parent | 032f5c0850c7034752be1c4c86a68fb9914ec3e0 (diff) | |
download | gnunet-2c529c7009239b4c9068069bb63f3978a9a41b1a.tar.gz gnunet-2c529c7009239b4c9068069bb63f3978a9a41b1a.zip |
- backchannel alternativ 1
-rw-r--r-- | src/transport/gnunet-communicator-udp.c | 18 | ||||
-rw-r--r-- | src/transport/test_communicator_basic.c | 2 | ||||
-rw-r--r-- | src/transport/transport-testing2.c | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c index 1df79745a..4dc65896e 100644 --- a/src/transport/gnunet-communicator-udp.c +++ b/src/transport/gnunet-communicator-udp.c | |||
@@ -969,7 +969,8 @@ secret_destroy (struct SharedSecret *ss) | |||
969 | GNUNET_CONTAINER_DLL_remove (receiver->ss_head, receiver->ss_tail, ss); | 969 | GNUNET_CONTAINER_DLL_remove (receiver->ss_head, receiver->ss_tail, ss); |
970 | receiver->num_secrets--; | 970 | receiver->num_secrets--; |
971 | // Uncomment this for alternativ 1 of backchannel functionality | 971 | // Uncomment this for alternativ 1 of backchannel functionality |
972 | // receiver->acks_available -= (ss->sequence_allowed - ss->sequence_used); | 972 | receiver->acks_available -= (ss->sequence_allowed - ss->sequence_used); |
973 | // Until here for alternativ 1 | ||
973 | } | 974 | } |
974 | while (NULL != (kce = ss->kce_head)) | 975 | while (NULL != (kce = ss->kce_head)) |
975 | kce_destroy (kce); | 976 | kce_destroy (kce); |
@@ -1341,14 +1342,15 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
1341 | ack->acks_available, | 1342 | ack->acks_available, |
1342 | GNUNET_h2s (&ss->master)); | 1343 | GNUNET_h2s (&ss->master)); |
1343 | // Uncomment this for alternativ 1 of backchannel functionality | 1344 | // Uncomment this for alternativ 1 of backchannel functionality |
1344 | /*receiver->acks_available += (allowed - ss->sequence_allowed); | 1345 | receiver->acks_available += (allowed - ss->sequence_allowed); |
1345 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1346 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1346 | "Tell transport we have more acks!\n"); | 1347 | "Tell transport we have more acks!\n"); |
1347 | GNUNET_TRANSPORT_communicator_mq_update (ch, | 1348 | GNUNET_TRANSPORT_communicator_mq_update (ch, |
1348 | receiver->d_qh, | 1349 | receiver->d_qh, |
1349 | (allowed | 1350 | (allowed |
1350 | - ss->sequence_allowed), | 1351 | - ss->sequence_allowed), |
1351 | 1);*/ | 1352 | 1); |
1353 | // Until here for alternativ 1 | ||
1352 | ss->sequence_allowed = allowed; | 1354 | ss->sequence_allowed = allowed; |
1353 | /* move ss to head to avoid discarding it anytime soon! */ | 1355 | /* move ss to head to avoid discarding it anytime soon! */ |
1354 | GNUNET_CONTAINER_DLL_remove (receiver->ss_head, receiver->ss_tail, ss); | 1356 | GNUNET_CONTAINER_DLL_remove (receiver->ss_head, receiver->ss_tail, ss); |
@@ -1356,7 +1358,7 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
1356 | } | 1358 | } |
1357 | 1359 | ||
1358 | // Uncomment this for alternativ 2 of backchannel functionality | 1360 | // Uncomment this for alternativ 2 of backchannel functionality |
1359 | if (receiver->acks_available != ack->acks_available) | 1361 | /*if (receiver->acks_available != ack->acks_available) |
1360 | { | 1362 | { |
1361 | receiver->acks_available = ack->acks_available; | 1363 | receiver->acks_available = ack->acks_available; |
1362 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1364 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1365,7 +1367,7 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value) | |||
1365 | receiver->d_qh, | 1367 | receiver->d_qh, |
1366 | receiver->acks_available, | 1368 | receiver->acks_available, |
1367 | 1); | 1369 | 1); |
1368 | } | 1370 | }*/ |
1369 | // Until here for alternativ 2 | 1371 | // Until here for alternativ 2 |
1370 | return GNUNET_NO; | 1372 | return GNUNET_NO; |
1371 | } | 1373 | } |
@@ -2198,9 +2200,11 @@ mq_send_d (struct GNUNET_MQ_Handle *mq, | |||
2198 | ss->sequence_used, | 2200 | ss->sequence_used, |
2199 | ss->sequence_allowed); | 2201 | ss->sequence_allowed); |
2200 | // Uncomment this for alternativ 1 of backchannel functionality | 2202 | // Uncomment this for alternativ 1 of backchannel functionality |
2201 | // if (ss->sequence_used >= ss->sequence_allowed) | 2203 | if (ss->sequence_used >= ss->sequence_allowed) |
2204 | // Until here for alternativ 1 | ||
2202 | // Uncomment this for alternativ 2 of backchannel functionality | 2205 | // Uncomment this for alternativ 2 of backchannel functionality |
2203 | if (0 == ss->sequence_allowed) | 2206 | // if (0 == ss->sequence_allowed) |
2207 | // Until here for alternativ 2 | ||
2204 | { | 2208 | { |
2205 | continue; | 2209 | continue; |
2206 | } | 2210 | } |
diff --git a/src/transport/test_communicator_basic.c b/src/transport/test_communicator_basic.c index d599d06c6..8251a5169 100644 --- a/src/transport/test_communicator_basic.c +++ b/src/transport/test_communicator_basic.c | |||
@@ -85,7 +85,7 @@ static unsigned int iterations_left = TOTAL_ITERATIONS; | |||
85 | #define TIMEOUT_MULTIPLIER 1 | 85 | #define TIMEOUT_MULTIPLIER 1 |
86 | 86 | ||
87 | #define DELAY \ | 87 | #define DELAY \ |
88 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,30) | 88 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,50) |
89 | 89 | ||
90 | #define SHORT_BURST_WINDOW \ | 90 | #define SHORT_BURST_WINDOW \ |
91 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2) | 91 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2) |
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c index 1e2579048..076fbf331 100644 --- a/src/transport/transport-testing2.c +++ b/src/transport/transport-testing2.c | |||
@@ -554,9 +554,10 @@ handle_update_queue_message (void *cls, | |||
554 | tc_queue->cs = msg->cs; | 554 | tc_queue->cs = msg->cs; |
555 | tc_queue->priority = ntohl (msg->priority); | 555 | tc_queue->priority = ntohl (msg->priority); |
556 | // Uncomment this for alternativ 1 of backchannel functionality | 556 | // Uncomment this for alternativ 1 of backchannel functionality |
557 | // tc_queue->q_len += GNUNET_ntohll (msg->q_len); | 557 | tc_queue->q_len += GNUNET_ntohll (msg->q_len); |
558 | // Until here for alternativ 1 | ||
558 | // Uncomment this for alternativ 2 of backchannel functionality | 559 | // Uncomment this for alternativ 2 of backchannel functionality |
559 | tc_queue->q_len = GNUNET_ntohll (msg->q_len); | 560 | // tc_queue->q_len = GNUNET_ntohll (msg->q_len); |
560 | // Until here for alternativ 2 | 561 | // Until here for alternativ 2 |
561 | GNUNET_SERVICE_client_continue (client->client); | 562 | GNUNET_SERVICE_client_continue (client->client); |
562 | } | 563 | } |
@@ -1135,8 +1136,9 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send | |||
1135 | } | 1136 | } |
1136 | GNUNET_assert (NULL != tc_queue); | 1137 | GNUNET_assert (NULL != tc_queue); |
1137 | // Uncomment this for alternativ 1 of backchannel functionality | 1138 | // Uncomment this for alternativ 1 of backchannel functionality |
1138 | /*if (tc_queue->q_len != GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED) | 1139 | if (tc_queue->q_len != GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED) |
1139 | tc_queue->q_len--;*/ | 1140 | tc_queue->q_len--; |
1141 | // Until here for alternativ 1 | ||
1140 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1142 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1141 | "Sending message\n"); | 1143 | "Sending message\n"); |
1142 | inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size; | 1144 | inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size; |