From c2ccd9da323ca84aceb1a3356d6d59b9c7d8e4ad Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 4 Jun 2019 22:20:59 +0200 Subject: [PATCH] fix --- src/transport/gnunet-service-tng.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index 206c59363..3e4d750a2 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c @@ -8650,16 +8650,6 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, if (NULL != pos->qe) continue; /* not eligible */ sc->consideration_counter++; - /* determine if we have to reliability-box, if so add reliability box - overhead */ - relb = GNUNET_NO; - if ((GNUNET_NO == frag) && - (0 == (pos->prefs & GNUNET_MQ_PREF_UNRELIABLE)) && - (GNUNET_TRANSPORT_CC_RELIABLE != queue->tc->details.communicator.cc)) - { - relb = GNUNET_YES; - real_overhead += sizeof (struct TransportReliabilityBoxMessage); - } /* determine if we have to fragment, if so add fragmentation overhead! */ frag = GNUNET_NO; @@ -8679,6 +8669,16 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, } real_overhead = overhead + sizeof (struct TransportFragmentBoxMessage); } + /* determine if we have to reliability-box, if so add reliability box + overhead */ + relb = GNUNET_NO; + if ((GNUNET_NO == frag) && + (0 == (pos->prefs & GNUNET_MQ_PREF_UNRELIABLE)) && + (GNUNET_TRANSPORT_CC_RELIABLE != queue->tc->details.communicator.cc)) + { + relb = GNUNET_YES; + real_overhead += sizeof (struct TransportReliabilityBoxMessage); + } /* Finally, compare to existing 'best' in sc to see if this 'pos' pending message would beat it! */ -- 2.25.1