diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-08 12:12:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-08 12:12:25 +0000 |
commit | 9b6eafa38e02ace11cc6217efee78e95b82eb19e (patch) | |
tree | 5bbaa2194b0809f34c2d51226ac28ad8f81ed975 | |
parent | e04e8965d95b5e2e8331140e204b578cdb2d74ba (diff) | |
download | gnunet-9b6eafa38e02ace11cc6217efee78e95b82eb19e.tar.gz gnunet-9b6eafa38e02ace11cc6217efee78e95b82eb19e.zip |
-fix
-rw-r--r-- | src/set/gnunet-service-set.c | 1 | ||||
-rw-r--r-- | src/set/gnunet-service-set_union.c | 3 | ||||
-rw-r--r-- | src/set/gnunet-service-set_union_strata_estimator.c | 8 | ||||
-rw-r--r-- | src/set/set.conf.in | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 441637a93..6a3552691 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -1988,6 +1988,7 @@ run (void *cls, | |||
1988 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS, 0}, | 1988 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS, 0}, |
1989 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DONE, 0}, | 1989 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DONE, 0}, |
1990 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SE, 0}, | 1990 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SE, 0}, |
1991 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SEC, 0}, | ||
1991 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO, 0}, | 1992 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO, 0}, |
1992 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF, 0}, | 1993 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF, 0}, |
1993 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE, 0}, | 1994 | { &dispatch_p2p_message, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE, 0}, |
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index bdcd4352e..78975749a 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -689,8 +689,7 @@ handle_p2p_strata_estimator (void *cls, | |||
689 | } | 689 | } |
690 | len = ntohs (mh->size) - sizeof (struct GNUNET_MessageHeader); | 690 | len = ntohs (mh->size) - sizeof (struct GNUNET_MessageHeader); |
691 | if ( (GNUNET_NO == is_compressed) && | 691 | if ( (GNUNET_NO == is_compressed) && |
692 | (len != | 692 | (len != SE_STRATA_COUNT * SE_IBF_SIZE * IBF_BUCKET_SIZE) ) |
693 | SE_STRATA_COUNT * SE_IBF_SIZE * IBF_BUCKET_SIZE) ) | ||
694 | { | 693 | { |
695 | fail_union_operation (op); | 694 | fail_union_operation (op); |
696 | GNUNET_break (0); | 695 | GNUNET_break (0); |
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c index 59d81e134..324d9d311 100644 --- a/src/set/gnunet-service-set_union_strata_estimator.c +++ b/src/set/gnunet-service-set_union_strata_estimator.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * Should we try compressing the strata estimator? This will | 33 | * Should we try compressing the strata estimator? This will |
34 | * break compatibility with the 0.10.1-network. | 34 | * break compatibility with the 0.10.1-network. |
35 | */ | 35 | */ |
36 | #define FAIL_10_1_COMPATIBILTIY 1 | 36 | #define FAIL_10_1_COMPATIBILTIY 0 |
37 | 37 | ||
38 | 38 | ||
39 | /** | 39 | /** |
@@ -123,6 +123,7 @@ strata_estimator_read (const void *buf, | |||
123 | GNUNET_free_non_null (dbuf); | 123 | GNUNET_free_non_null (dbuf); |
124 | return GNUNET_SYSERR; | 124 | return GNUNET_SYSERR; |
125 | } | 125 | } |
126 | |||
126 | for (i = 0; i < se->strata_count; i++) | 127 | for (i = 0; i < se->strata_count; i++) |
127 | { | 128 | { |
128 | ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]); | 129 | ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]); |
@@ -202,6 +203,8 @@ strata_estimator_create (unsigned int strata_count, | |||
202 | se->strata[i] = ibf_create (ibf_size, ibf_hashnum); | 203 | se->strata[i] = ibf_create (ibf_size, ibf_hashnum); |
203 | if (NULL == se->strata[i]) | 204 | if (NULL == se->strata[i]) |
204 | { | 205 | { |
206 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
207 | "Failed to allocate memory for strata estimator\n"); | ||
205 | for (j = 0; j < i; j++) | 208 | for (j = 0; j < i; j++) |
206 | ibf_destroy (se->strata[i]); | 209 | ibf_destroy (se->strata[i]); |
207 | GNUNET_free (se); | 210 | GNUNET_free (se); |
@@ -277,7 +280,8 @@ strata_estimator_dup (struct StrataEstimator *se) | |||
277 | c = GNUNET_new (struct StrataEstimator); | 280 | c = GNUNET_new (struct StrataEstimator); |
278 | c->strata_count = se->strata_count; | 281 | c->strata_count = se->strata_count; |
279 | c->ibf_size = se->ibf_size; | 282 | c->ibf_size = se->ibf_size; |
280 | c->strata = GNUNET_malloc (sizeof (struct InvertibleBloomFilter *) * se->strata_count); | 283 | c->strata = GNUNET_new_array (se->strata_count, |
284 | struct InvertibleBloomFilter *); | ||
281 | for (i = 0; i < se->strata_count; i++) | 285 | for (i = 0; i < se->strata_count; i++) |
282 | c->strata[i] = ibf_dup (se->strata[i]); | 286 | c->strata[i] = ibf_dup (se->strata[i]); |
283 | return c; | 287 | return c; |
diff --git a/src/set/set.conf.in b/src/set/set.conf.in index 462ce70ed..707bc3575 100644 --- a/src/set/set.conf.in +++ b/src/set/set.conf.in | |||
@@ -9,4 +9,4 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-set.sock | |||
9 | UNIX_MATCH_UID = YES | 9 | UNIX_MATCH_UID = YES |
10 | UNIX_MATCH_GID = YES | 10 | UNIX_MATCH_GID = YES |
11 | 11 | ||
12 | PREFIX = valgrind | 12 | # PREFIX = valgrind |