fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 4 Jun 2019 20:20:59 +0000 (22:20 +0200)
committerChristian Grothoff <christian@grothoff.org>
Tue, 4 Jun 2019 20:20:59 +0000 (22:20 +0200)
src/transport/gnunet-service-tng.c

index 206c5936302f0739343252bf6e0bcbca17f10957..3e4d750a27c4a11aeff4059a7766ec7e6d8a07fb 100644 (file)
@@ -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! */