diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-02-26 20:40:51 +0100 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-02-26 20:40:51 +0100 |
commit | d3f53a314973f2b0d46a5f86d5f0dd73610eeec2 (patch) | |
tree | 921bf82e3b9e73b3ecaa72f911ff0cbb13719868 /src/transport | |
parent | ad3e581f24153c42d3c39b4af4b83b830f18fecd (diff) | |
download | gnunet-d3f53a314973f2b0d46a5f86d5f0dd73610eeec2.tar.gz gnunet-d3f53a314973f2b0d46a5f86d5f0dd73610eeec2.zip |
-tng idling
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-tng.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index f5a318b96..3cba49250 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -4199,18 +4199,6 @@ queue_send_msg (struct Queue *queue, | |||
4199 | struct GNUNET_TRANSPORT_SendMessageTo *smt; | 4199 | struct GNUNET_TRANSPORT_SendMessageTo *smt; |
4200 | struct GNUNET_MQ_Envelope *env; | 4200 | struct GNUNET_MQ_Envelope *env; |
4201 | 4201 | ||
4202 | /** | ||
4203 | * FIXME: the queue idle member does not really make | ||
4204 | * sense in the code. | ||
4205 | * It is not clear what "idle" should mean? If it means | ||
4206 | * the queue is empty, then other code (see schedule_retransmit) | ||
4207 | * does not make sense at it ALWAYS expects and idle queue | ||
4208 | * or will refuse to transmit because it is "busy". | ||
4209 | * The problem is that the queue is (was) never set to | ||
4210 | * idle in the code. Now it is, but it is unclear if the | ||
4211 | * expected logic is preserved. | ||
4212 | */ | ||
4213 | queue->idle = GNUNET_NO; | ||
4214 | GNUNET_log ( | 4202 | GNUNET_log ( |
4215 | GNUNET_ERROR_TYPE_DEBUG, | 4203 | GNUNET_ERROR_TYPE_DEBUG, |
4216 | "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n", | 4204 | "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n", |
@@ -8882,6 +8870,8 @@ transmit_on_queue (void *cls) | |||
8882 | queue->idle = GNUNET_YES; | 8870 | queue->idle = GNUNET_YES; |
8883 | return; | 8871 | return; |
8884 | } | 8872 | } |
8873 | /* There is a message pending, we are certainly not idle */ | ||
8874 | queue->idle = GNUNET_NO; | ||
8885 | 8875 | ||
8886 | /* Given selection in `sc`, do transmission */ | 8876 | /* Given selection in `sc`, do transmission */ |
8887 | pm = sc.best; | 8877 | pm = sc.best; |
@@ -9107,7 +9097,6 @@ handle_send_message_ack (void *cls, | |||
9107 | qe->queue->queue_length, | 9097 | qe->queue->queue_length, |
9108 | tc->details.communicator.total_queue_length); | 9098 | tc->details.communicator.total_queue_length); |
9109 | GNUNET_SERVICE_client_continue (tc->client); | 9099 | GNUNET_SERVICE_client_continue (tc->client); |
9110 | qe->queue->idle = GNUNET_YES; | ||
9111 | 9100 | ||
9112 | /* if applicable, resume transmissions that waited on ACK */ | 9101 | /* if applicable, resume transmissions that waited on ACK */ |
9113 | if (COMMUNICATOR_TOTAL_QUEUE_LIMIT - 1 == | 9102 | if (COMMUNICATOR_TOTAL_QUEUE_LIMIT - 1 == |