[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix related to #4909/12605:
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix related to #4909/12605: force desirability of path if path is in use |
Date: |
Sun, 03 Dec 2017 17:16:19 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 90c803401 fix related to #4909/12605: force desirability of path if
path is in use
90c803401 is described below
commit 90c803401e6dbe336c6469ff874b0005e7a2f163
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Dec 3 17:16:14 2017 +0100
fix related to #4909/12605: force desirability of path if path is in use
---
src/cadet/gnunet-service-cadet_paths.c | 5 +++--
src/set/gnunet-service-set_union.c | 7 +++----
src/set/gnunet-service-set_union_strata_estimator.c | 6 ++----
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet_paths.c
b/src/cadet/gnunet-service-cadet_paths.c
index 79eed0dcc..7b90fe152 100644
--- a/src/cadet/gnunet-service-cadet_paths.c
+++ b/src/cadet/gnunet-service-cadet_paths.c
@@ -179,7 +179,7 @@ GCPP_del_connection (struct CadetPeerPath *path,
GCC_2s (cc),
GCPP_2s (path),
off);
- GNUNET_assert (off < path->entries_length); /* FIXME: This assertion fails
sometimes! */
+ GNUNET_assert (off < path->entries_length); /* FIXME: #4909: This assertion
fails sometimes! */
entry = path->entries[off];
GNUNET_assert (cc == entry->cc);
entry->cc = NULL;
@@ -428,13 +428,14 @@ extend_path (struct CadetPeerPath *path,
path->entries_length = old_len + i + 1;
recalculate_path_desirability (path);
+ if (NULL != entry->cc)
+ force = GNUNET_YES;
path->hn = GCP_attach_path (peers[i],
path,
old_len + (unsigned int) i,
force);
if (NULL != path->hn)
break;
- GNUNET_assert (NULL == entry->cc);
GCP_path_entry_remove (entry->peer,
entry,
old_len + i);
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)
unsigned int ibf_order;
ibf_order = 2;
- while ( (1<<ibf_order) < (IBF_ALPHA * diff) ||
- ((1<<ibf_order) < SE_IBF_HASH_NUM) )
+ while ( ( (1<<ibf_order) < (IBF_ALPHA * diff) ||
+ ((1<<ibf_order) < SE_IBF_HASH_NUM) ) &&
+ (ibf_order < MAX_IBF_ORDER) )
ibf_order++;
- if (ibf_order > MAX_IBF_ORDER)
- ibf_order = MAX_IBF_ORDER;
// add one for correction
return ibf_order + 1;
}
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c
b/src/set/gnunet-service-set_union_strata_estimator.c
index e3d6bfaec..0bd22c92e 100644
--- a/src/set/gnunet-service-set_union_strata_estimator.c
+++ b/src/set/gnunet-service-set_union_strata_estimator.c
@@ -228,21 +228,19 @@ unsigned int
strata_estimator_difference (const struct StrataEstimator *se1,
const struct StrataEstimator *se2)
{
- int i;
unsigned int count;
GNUNET_assert (se1->strata_count == se2->strata_count);
count = 0;
- for (i = se1->strata_count - 1; i >= 0; i--)
+ for (int i = se1->strata_count - 1; i >= 0; i--)
{
struct InvertibleBloomFilter *diff;
/* number of keys decoded from the ibf */
- int ibf_count;
/* FIXME: implement this without always allocating new IBFs */
diff = ibf_dup (se1->strata[i]);
ibf_subtract (diff, se2->strata[i]);
- for (ibf_count = 0; GNUNET_YES; ibf_count++)
+ for (int ibf_count = 0; GNUNET_YES; ibf_count++)
{
int more;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: fix related to #4909/12605: force desirability of path if path is in use,
gnunet <=