From: Christian Grothoff Date: Tue, 4 Jun 2019 20:20:59 +0000 (+0200) Subject: fix X-Git-Tag: v0.11.5~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c2ccd9da323ca84aceb1a3356d6d59b9c7d8e4ad;p=oweals%2Fgnunet.git fix --- 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! */