summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-02-26 16:26:23 +0100
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-02-26 16:26:23 +0100
commitad3e581f24153c42d3c39b4af4b83b830f18fecd (patch)
tree5fe8133780f7c9c3cd7cfc50cb046b57dcb3d0d9
parent0236c3a219f89826532e8b9134a81be01fda0369 (diff)
-rework idle handling
-rw-r--r--src/transport/gnunet-service-tng.c5
-rw-r--r--src/transport/transport-testing2.c8
2 files changed, 2 insertions, 11 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 1bdd6fa7b..f5a318b96 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -4210,7 +4210,7 @@ queue_send_msg (struct Queue *queue,
* idle in the code. Now it is, but it is unclear if the
* expected logic is preserved.
*/
- //queue->idle = GNUNET_NO;
+ queue->idle = GNUNET_NO;
GNUNET_log (
GNUNET_ERROR_TYPE_DEBUG,
"Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n",
@@ -9107,6 +9107,7 @@ handle_send_message_ack (void *cls,
qe->queue->queue_length,
tc->details.communicator.total_queue_length);
GNUNET_SERVICE_client_continue (tc->client);
+ qe->queue->idle = GNUNET_YES;
/* if applicable, resume transmissions that waited on ACK */
if (COMMUNICATOR_TOTAL_QUEUE_LIMIT - 1 ==
@@ -9123,7 +9124,6 @@ handle_send_message_ack (void *cls,
NULL != queue;
queue = queue->next_client)
{
- queue->idle = GNUNET_YES;
schedule_transmit_on_queue (queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
}
}
@@ -9134,7 +9134,6 @@ handle_send_message_ack (void *cls,
"# Transmission throttled due to queue queue limit",
-1,
GNUNET_NO);
- qe->queue->idle = GNUNET_YES;
schedule_transmit_on_queue (qe->queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
}
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c
index 789181d1f..eaa8a5f15 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -340,13 +340,8 @@ hello_iter_cb (void *cb_cls,
if ((NULL == record) && (NULL == emsg))
{
p->pic = NULL;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Iteration End\n");
if (NULL != p->start_cb)
- {
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Did not yet get my hello. Retrying...\n");
p->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, p);
- }
return;
}
// Check record type et al?
@@ -373,9 +368,6 @@ static void
retrieve_hello (void *cls)
{
struct GNUNET_TRANSPORT_TESTING_PeerContext *p = cls;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Getting hello...\n");
-
p->rh_task = NULL;
p->pic = GNUNET_PEERSTORE_iterate (p->ph,
"transport",