diff options
Diffstat (limited to 'src/transport/gnunet-communicator-udp.c')
-rw-r--r-- | src/transport/gnunet-communicator-udp.c | 18 |
1 files changed, 11 insertions, 7 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 | } |