diff options
Diffstat (limited to 'src/set/gnunet-service-set_intersection.c')
-rw-r--r-- | src/set/gnunet-service-set_intersection.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c index 2a1cf634b..3082f94b5 100644 --- a/src/set/gnunet-service-set_intersection.c +++ b/src/set/gnunet-service-set_intersection.c | |||
@@ -175,13 +175,13 @@ struct IntersectionEvaluateOperation | |||
175 | * was created. | 175 | * was created. |
176 | */ | 176 | */ |
177 | unsigned int generation_created; | 177 | unsigned int generation_created; |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * Evaluate operations are held in | 180 | * Evaluate operations are held in |
181 | * a linked list. | 181 | * a linked list. |
182 | */ | 182 | */ |
183 | struct IntersectionEvaluateOperation *next; | 183 | struct IntersectionEvaluateOperation *next; |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * Evaluate operations are held in | 186 | * Evaluate operations are held in |
187 | * a linked list. | 187 | * a linked list. |
@@ -224,7 +224,7 @@ struct ElementEntry | |||
224 | int removed; | 224 | int removed; |
225 | 225 | ||
226 | /** | 226 | /** |
227 | * Generation the element was removed by the client. | 227 | * Generation the element was removed by the client. |
228 | * Operations of later generations will not consider the element. | 228 | * Operations of later generations will not consider the element. |
229 | * Only valid if is_removed is GNUNET_YES. | 229 | * Only valid if is_removed is GNUNET_YES. |
230 | */ | 230 | */ |
@@ -374,7 +374,7 @@ destroy_key_to_element_iter (void *cls, | |||
374 | void *value) | 374 | void *value) |
375 | { | 375 | { |
376 | struct KeyEntry *k = value; | 376 | struct KeyEntry *k = value; |
377 | 377 | ||
378 | while (NULL != k) | 378 | while (NULL != k) |
379 | { | 379 | { |
380 | struct KeyEntry *k_tmp = k; | 380 | struct KeyEntry *k_tmp = k; |
@@ -395,7 +395,7 @@ void | |||
395 | _GSS_union_operation_destroy (struct UnionEvaluateOperation *eo) | 395 | _GSS_union_operation_destroy (struct UnionEvaluateOperation *eo) |
396 | { | 396 | { |
397 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "destroying union op\n"); | 397 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "destroying union op\n"); |
398 | 398 | ||
399 | if (NULL != eo->tunnel) | 399 | if (NULL != eo->tunnel) |
400 | { | 400 | { |
401 | GNUNET_MESH_tunnel_destroy (eo->tunnel); | 401 | GNUNET_MESH_tunnel_destroy (eo->tunnel); |
@@ -457,7 +457,7 @@ fail_union_operation (struct UnionEvaluateOperation *eo) | |||
457 | 457 | ||
458 | 458 | ||
459 | /** | 459 | /** |
460 | * Derive the IBF key from a hash code and | 460 | * Derive the IBF key from a hash code and |
461 | * a salt. | 461 | * a salt. |
462 | * | 462 | * |
463 | * @param src the hash code | 463 | * @param src the hash code |
@@ -863,14 +863,14 @@ decode_and_send (struct UnionEvaluateOperation *eo) | |||
863 | next_order++; | 863 | next_order++; |
864 | if (next_order <= MAX_IBF_ORDER) | 864 | if (next_order <= MAX_IBF_ORDER) |
865 | { | 865 | { |
866 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 866 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
867 | "decoding failed, sending larger ibf (size %u)\n", | 867 | "decoding failed, sending larger ibf (size %u)\n", |
868 | 1<<next_order); | 868 | 1<<next_order); |
869 | send_ibf (eo, next_order); | 869 | send_ibf (eo, next_order); |
870 | } | 870 | } |
871 | else | 871 | else |
872 | { | 872 | { |
873 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 873 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
874 | "set union failed: reached ibf limit\n"); | 874 | "set union failed: reached ibf limit\n"); |
875 | } | 875 | } |
876 | break; | 876 | break; |
@@ -950,7 +950,7 @@ handle_p2p_ibf (void *cls, const struct GNUNET_MessageHeader *mh) | |||
950 | fail_union_operation (eo); | 950 | fail_union_operation (eo); |
951 | return; | 951 | return; |
952 | } | 952 | } |
953 | 953 | ||
954 | ibf_read_slice (&msg[1], eo->ibf_buckets_received, buckets_in_message, eo->remote_ibf); | 954 | ibf_read_slice (&msg[1], eo->ibf_buckets_received, buckets_in_message, eo->remote_ibf); |
955 | eo->ibf_buckets_received += buckets_in_message; | 955 | eo->ibf_buckets_received += buckets_in_message; |
956 | 956 | ||
@@ -1106,7 +1106,7 @@ peer_done_sent_cb (void *cls) | |||
1106 | 1106 | ||
1107 | /** | 1107 | /** |
1108 | * Handle a done message from a remote peer | 1108 | * Handle a done message from a remote peer |
1109 | * | 1109 | * |
1110 | * @param cls the union operation | 1110 | * @param cls the union operation |
1111 | * @param mh the message | 1111 | * @param mh the message |
1112 | */ | 1112 | */ |
@@ -1160,15 +1160,15 @@ _GSS_intersection_evaluate (struct GNUNET_SET_EvaluateMessage *m, struct Set *se | |||
1160 | eo->se = strata_estimator_dup (set->state.i->se); | 1160 | eo->se = strata_estimator_dup (set->state.i->se); |
1161 | eo->salt = ntohs (m->salt); | 1161 | eo->salt = ntohs (m->salt); |
1162 | eo->app_id = m->app_id; | 1162 | eo->app_id = m->app_id; |
1163 | 1163 | ||
1164 | context_msg = GNUNET_MQ_extract_nested_mh (m); | 1164 | context_msg = GNUNET_MQ_extract_nested_mh (m); |
1165 | if (NULL != context_msg) | 1165 | if (NULL != context_msg) |
1166 | { | 1166 | { |
1167 | eo->context_msg = GNUNET_copy_message (context_msg); | 1167 | eo->context_msg = GNUNET_copy_message (context_msg); |
1168 | } | 1168 | } |
1169 | 1169 | ||
1170 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1170 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1171 | "evaluating intersection operation, (app %s)\n", | 1171 | "evaluating intersection operation, (app %s)\n", |
1172 | GNUNET_h2s (&eo->app_id)); | 1172 | GNUNET_h2s (&eo->app_id)); |
1173 | 1173 | ||
1174 | eo->tc = GNUNET_new (struct TunnelContext); | 1174 | eo->tc = GNUNET_new (struct TunnelContext); |
@@ -1231,7 +1231,7 @@ _GSS_intersection_set_create (void) | |||
1231 | struct Set *set; | 1231 | struct Set *set; |
1232 | 1232 | ||
1233 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "intersection set created\n"); | 1233 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "intersection set created\n"); |
1234 | 1234 | ||
1235 | set = GNUNET_malloc (sizeof (struct Set) + sizeof (struct IntersectionState)); | 1235 | set = GNUNET_malloc (sizeof (struct Set) + sizeof (struct IntersectionState)); |
1236 | set->state.i = (struct IntersectionState *) &set[1]; | 1236 | set->state.i = (struct IntersectionState *) &set[1]; |
1237 | set->operation = GNUNET_SET_OPERATION_INTERSECTION; | 1237 | set->operation = GNUNET_SET_OPERATION_INTERSECTION; |
@@ -1239,7 +1239,7 @@ _GSS_intersection_set_create (void) | |||
1239 | * want the hash map to copy them */ | 1239 | * want the hash map to copy them */ |
1240 | set->state.i->elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES); | 1240 | set->state.i->elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES); |
1241 | set->state.i->se = strata_estimator_create (SE_STRATA_COUNT, | 1241 | set->state.i->se = strata_estimator_create (SE_STRATA_COUNT, |
1242 | SE_IBF_SIZE, SE_IBF_HASH_NUM); | 1242 | SE_IBF_SIZE, SE_IBF_HASH_NUM); |
1243 | return set; | 1243 | return set; |
1244 | } | 1244 | } |
1245 | 1245 | ||