aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent0236c3a219f89826532e8b9134a81be01fda0369 (diff)
downloadgnunet-ad3e581f24153c42d3c39b4af4b83b830f18fecd.tar.gz
gnunet-ad3e581f24153c42d3c39b4af4b83b830f18fecd.zip
-rework idle handling
Diffstat (limited to 'src')
-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,
4210 * idle in the code. Now it is, but it is unclear if the 4210 * idle in the code. Now it is, but it is unclear if the
4211 * expected logic is preserved. 4211 * expected logic is preserved.
4212 */ 4212 */
4213 //queue->idle = GNUNET_NO; 4213 queue->idle = GNUNET_NO;
4214 GNUNET_log ( 4214 GNUNET_log (
4215 GNUNET_ERROR_TYPE_DEBUG, 4215 GNUNET_ERROR_TYPE_DEBUG,
4216 "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n", 4216 "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n",
@@ -9107,6 +9107,7 @@ handle_send_message_ack (void *cls,
9107 qe->queue->queue_length, 9107 qe->queue->queue_length,
9108 tc->details.communicator.total_queue_length); 9108 tc->details.communicator.total_queue_length);
9109 GNUNET_SERVICE_client_continue (tc->client); 9109 GNUNET_SERVICE_client_continue (tc->client);
9110 qe->queue->idle = GNUNET_YES;
9110 9111
9111 /* if applicable, resume transmissions that waited on ACK */ 9112 /* if applicable, resume transmissions that waited on ACK */
9112 if (COMMUNICATOR_TOTAL_QUEUE_LIMIT - 1 == 9113 if (COMMUNICATOR_TOTAL_QUEUE_LIMIT - 1 ==
@@ -9123,7 +9124,6 @@ handle_send_message_ack (void *cls,
9123 NULL != queue; 9124 NULL != queue;
9124 queue = queue->next_client) 9125 queue = queue->next_client)
9125 { 9126 {
9126 queue->idle = GNUNET_YES;
9127 schedule_transmit_on_queue (queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT); 9127 schedule_transmit_on_queue (queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
9128 } 9128 }
9129 } 9129 }
@@ -9134,7 +9134,6 @@ handle_send_message_ack (void *cls,
9134 "# Transmission throttled due to queue queue limit", 9134 "# Transmission throttled due to queue queue limit",
9135 -1, 9135 -1,
9136 GNUNET_NO); 9136 GNUNET_NO);
9137 qe->queue->idle = GNUNET_YES;
9138 schedule_transmit_on_queue (qe->queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT); 9137 schedule_transmit_on_queue (qe->queue, GNUNET_SCHEDULER_PRIORITY_DEFAULT);
9139 } 9138 }
9140 9139
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,
340 if ((NULL == record) && (NULL == emsg)) 340 if ((NULL == record) && (NULL == emsg))
341 { 341 {
342 p->pic = NULL; 342 p->pic = NULL;
343 LOG (GNUNET_ERROR_TYPE_DEBUG, "Iteration End\n");
344 if (NULL != p->start_cb) 343 if (NULL != p->start_cb)
345 {
346 LOG (GNUNET_ERROR_TYPE_DEBUG,
347 "Did not yet get my hello. Retrying...\n");
348 p->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, p); 344 p->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, p);
349 }
350 return; 345 return;
351 } 346 }
352 // Check record type et al? 347 // Check record type et al?
@@ -373,9 +368,6 @@ static void
373retrieve_hello (void *cls) 368retrieve_hello (void *cls)
374{ 369{
375 struct GNUNET_TRANSPORT_TESTING_PeerContext *p = cls; 370 struct GNUNET_TRANSPORT_TESTING_PeerContext *p = cls;
376 LOG (GNUNET_ERROR_TYPE_DEBUG,
377 "Getting hello...\n");
378
379 p->rh_task = NULL; 371 p->rh_task = NULL;
380 p->pic = GNUNET_PEERSTORE_iterate (p->ph, 372 p->pic = GNUNET_PEERSTORE_iterate (p->ph,
381 "transport", 373 "transport",