diff options
-rw-r--r-- | src/setu/gnunet-service-setu.c | 3 | ||||
-rw-r--r-- | src/setu/ibf.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c index e7f27bd7d..e5d8751f2 100644 --- a/src/setu/gnunet-service-setu.c +++ b/src/setu/gnunet-service-setu.c | |||
@@ -1000,7 +1000,8 @@ op_register_element (struct Operation *op, | |||
1000 | 1000 | ||
1001 | 1001 | ||
1002 | /** | 1002 | /** |
1003 | * FIXME. | 1003 | * Modify an IBF key @a k_in based on the @a salt, returning a |
1004 | * salted key in @a k_out. | ||
1004 | */ | 1005 | */ |
1005 | static void | 1006 | static void |
1006 | salt_key (const struct IBF_Key *k_in, | 1007 | salt_key (const struct IBF_Key *k_in, |
diff --git a/src/setu/ibf.c b/src/setu/ibf.c index 565adbbf0..79b4f28db 100644 --- a/src/setu/ibf.c +++ b/src/setu/ibf.c | |||
@@ -129,10 +129,10 @@ ibf_get_indices (const struct InvertibleBloomFilter *ibf, | |||
129 | uint64_t x; | 129 | uint64_t x; |
130 | 130 | ||
131 | for (unsigned int j = 0; j < filled; j++) | 131 | for (unsigned int j = 0; j < filled; j++) |
132 | if (dst[j] == bucket) | 132 | if (dst[j] == bucket % ibf->size) |
133 | goto try_next; | 133 | goto try_next; |
134 | dst[filled++] = bucket % ibf->size; | 134 | dst[filled++] = bucket % ibf->size; |
135 | try_next:; | 135 | try_next: |
136 | x = ((uint64_t) bucket << 32) | i; | 136 | x = ((uint64_t) bucket << 32) | i; |
137 | bucket = GNUNET_CRYPTO_crc32_n (&x, sizeof x); | 137 | bucket = GNUNET_CRYPTO_crc32_n (&x, sizeof x); |
138 | } | 138 | } |