aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_union.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-03 17:16:14 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-03 17:16:14 +0100
commit90c803401e6dbe336c6469ff874b0005e7a2f163 (patch)
tree2e7c79b2bda41d7937da6217c35e890b5e1bf260 /src/set/gnunet-service-set_union.c
parent862e488e08ca71db56dedd59059c5bb1a8c130a5 (diff)
downloadgnunet-90c803401e6dbe336c6469ff874b0005e7a2f163.tar.gz
gnunet-90c803401e6dbe336c6469ff874b0005e7a2f163.zip
fix related to #4909/12605: force desirability of path if path is in use
Diffstat (limited to 'src/set/gnunet-service-set_union.c')
-rw-r--r--src/set/gnunet-service-set_union.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index b2983545f..730124495 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -739,11 +739,10 @@ get_order_from_difference (unsigned int diff)
739 unsigned int ibf_order; 739 unsigned int ibf_order;
740 740
741 ibf_order = 2; 741 ibf_order = 2;
742 while ( (1<<ibf_order) < (IBF_ALPHA * diff) || 742 while ( ( (1<<ibf_order) < (IBF_ALPHA * diff) ||
743 ((1<<ibf_order) < SE_IBF_HASH_NUM) ) 743 ((1<<ibf_order) < SE_IBF_HASH_NUM) ) &&
744 (ibf_order < MAX_IBF_ORDER) )
744 ibf_order++; 745 ibf_order++;
745 if (ibf_order > MAX_IBF_ORDER)
746 ibf_order = MAX_IBF_ORDER;
747 // add one for correction 746 // add one for correction
748 return ibf_order + 1; 747 return ibf_order + 1;
749} 748}