summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-communicator-udp.c18
-rw-r--r--src/transport/test_communicator_basic.c2
-rw-r--r--src/transport/transport-testing2.c10
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)
GNUNET_CONTAINER_DLL_remove (receiver->ss_head, receiver->ss_tail, ss);
receiver->num_secrets--;
// Uncomment this for alternativ 1 of backchannel functionality
- // receiver->acks_available -= (ss->sequence_allowed - ss->sequence_used);
+ receiver->acks_available -= (ss->sequence_allowed - ss->sequence_used);
+ // Until here for alternativ 1
}
while (NULL != (kce = ss->kce_head))
kce_destroy (kce);
@@ -1341,14 +1342,15 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
ack->acks_available,
GNUNET_h2s (&ss->master));
// Uncomment this for alternativ 1 of backchannel functionality
- /*receiver->acks_available += (allowed - ss->sequence_allowed);
+ receiver->acks_available += (allowed - ss->sequence_allowed);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Tell transport we have more acks!\n");
GNUNET_TRANSPORT_communicator_mq_update (ch,
receiver->d_qh,
(allowed
- ss->sequence_allowed),
- 1);*/
+ 1);
+ // Until here for alternativ 1
ss->sequence_allowed = allowed;
/* move ss to head to avoid discarding it anytime soon! */
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)
}
// Uncomment this for alternativ 2 of backchannel functionality
- if (receiver->acks_available != ack->acks_available)
+ /*if (receiver->acks_available != ack->acks_available)
{
receiver->acks_available = ack->acks_available;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1365,7 +1367,7 @@ handle_ack (void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
receiver->d_qh,
receiver->acks_available,
1);
- }
+ }*/
// Until here for alternativ 2
return GNUNET_NO;
}
@@ -2198,9 +2200,11 @@ mq_send_d (struct GNUNET_MQ_Handle *mq,
ss->sequence_used,
ss->sequence_allowed);
// Uncomment this for alternativ 1 of backchannel functionality
- // if (ss->sequence_used >= ss->sequence_allowed)
+ if (ss->sequence_used >= ss->sequence_allowed)
+ // Until here for alternativ 1
// Uncomment this for alternativ 2 of backchannel functionality
- if (0 == ss->sequence_allowed)
+ // if (0 == ss->sequence_allowed)
+ // Until here for alternativ 2
{
continue;
}
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;
#define TIMEOUT_MULTIPLIER 1
#define DELAY \
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,30)
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,50)
#define SHORT_BURST_WINDOW \
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,
tc_queue->cs = msg->cs;
tc_queue->priority = ntohl (msg->priority);
// Uncomment this for alternativ 1 of backchannel functionality
- // tc_queue->q_len += GNUNET_ntohll (msg->q_len);
+ tc_queue->q_len += GNUNET_ntohll (msg->q_len);
+ // Until here for alternativ 1
// Uncomment this for alternativ 2 of backchannel functionality
- tc_queue->q_len = GNUNET_ntohll (msg->q_len);
+ // tc_queue->q_len = GNUNET_ntohll (msg->q_len);
// Until here for alternativ 2
GNUNET_SERVICE_client_continue (client->client);
}
@@ -1135,8 +1136,9 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send
}
GNUNET_assert (NULL != tc_queue);
// Uncomment this for alternativ 1 of backchannel functionality
- /*if (tc_queue->q_len != GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED)
- tc_queue->q_len--;*/
+ if (tc_queue->q_len != GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED)
+ tc_queue->q_len--;
+ // Until here for alternativ 1
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending message\n");
inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size;