aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_union.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/set/gnunet-service-set_union.c')
-rw-r--r--src/set/gnunet-service-set_union.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index b70436635..436d707d7 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -166,13 +166,13 @@ struct OperationState
166 * belongs to. 166 * belongs to.
167 */ 167 */
168 struct Set *set; 168 struct Set *set;
169 169
170 /** 170 /**
171 * Evaluate operations are held in 171 * Evaluate operations are held in
172 * a linked list. 172 * a linked list.
173 */ 173 */
174 struct OperationState *next; 174 struct OperationState *next;
175 175
176 /** 176 /**
177 * Evaluate operations are held in 177 * Evaluate operations are held in
178 * a linked list. 178 * a linked list.
@@ -273,7 +273,7 @@ destroy_key_to_element_iter (void *cls,
273 void *value) 273 void *value)
274{ 274{
275 struct KeyEntry *k = value; 275 struct KeyEntry *k = value;
276 276
277 while (NULL != k) 277 while (NULL != k)
278 { 278 {
279 struct KeyEntry *k_tmp = k; 279 struct KeyEntry *k_tmp = k;
@@ -374,7 +374,7 @@ fail_union_operation (struct OperationState *eo)
374 374
375 375
376/** 376/**
377 * Derive the IBF key from a hash code and 377 * Derive the IBF key from a hash code and
378 * a salt. 378 * a salt.
379 * 379 *
380 * @param src the hash code 380 * @param src the hash code
@@ -788,7 +788,7 @@ decode_and_send (struct OperationState *eo)
788 prepare_ibf (eo, eo->remote_ibf->size); 788 prepare_ibf (eo, eo->remote_ibf->size);
789 diff_ibf = ibf_dup (eo->local_ibf); 789 diff_ibf = ibf_dup (eo->local_ibf);
790 ibf_subtract (diff_ibf, eo->remote_ibf); 790 ibf_subtract (diff_ibf, eo->remote_ibf);
791 791
792 ibf_destroy (eo->remote_ibf); 792 ibf_destroy (eo->remote_ibf);
793 eo->remote_ibf = NULL; 793 eo->remote_ibf = NULL;
794 794
@@ -826,14 +826,14 @@ decode_and_send (struct OperationState *eo)
826 next_order++; 826 next_order++;
827 if (next_order <= MAX_IBF_ORDER) 827 if (next_order <= MAX_IBF_ORDER)
828 { 828 {
829 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 829 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
830 "decoding failed, sending larger ibf (size %u)\n", 830 "decoding failed, sending larger ibf (size %u)\n",
831 1<<next_order); 831 1<<next_order);
832 send_ibf (eo, next_order); 832 send_ibf (eo, next_order);
833 } 833 }
834 else 834 else
835 { 835 {
836 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 836 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
837 "set union failed: reached ibf limit\n"); 837 "set union failed: reached ibf limit\n");
838 } 838 }
839 break; 839 break;
@@ -862,7 +862,7 @@ decode_and_send (struct OperationState *eo)
862 * so that we don't request it again with the next ibf if decoding fails */ 862 * so that we don't request it again with the next ibf if decoding fails */
863 ev = GNUNET_MQ_msg_header_extra (msg, sizeof (struct IBF_Key), 863 ev = GNUNET_MQ_msg_header_extra (msg, sizeof (struct IBF_Key),
864 GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS); 864 GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS);
865 865
866 *(struct IBF_Key *) &msg[1] = key; 866 *(struct IBF_Key *) &msg[1] = key;
867 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending element request\n"); 867 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending element request\n");
868 GNUNET_MQ_send (eo->mq, ev); 868 GNUNET_MQ_send (eo->mq, ev);
@@ -930,7 +930,7 @@ handle_p2p_ibf (void *cls, const struct GNUNET_MessageHeader *mh)
930 fail_union_operation (eo); 930 fail_union_operation (eo);
931 return; 931 return;
932 } 932 }
933 933
934 ibf_read_slice (&msg[1], eo->ibf_buckets_received, buckets_in_message, eo->remote_ibf); 934 ibf_read_slice (&msg[1], eo->ibf_buckets_received, buckets_in_message, eo->remote_ibf);
935 eo->ibf_buckets_received += buckets_in_message; 935 eo->ibf_buckets_received += buckets_in_message;
936 936
@@ -1080,7 +1080,7 @@ handle_p2p_element_requests (void *cls, const struct GNUNET_MessageHeader *mh)
1080 1080
1081/** 1081/**
1082 * Handle a done message from a remote peer 1082 * Handle a done message from a remote peer
1083 * 1083 *
1084 * @param cls the union operation 1084 * @param cls the union operation
1085 * @param mh the message 1085 * @param mh the message
1086 */ 1086 */
@@ -1139,8 +1139,8 @@ union_evaluate (struct OperationSpecification *spec,
1139 eo->tunnel = tunnel; 1139 eo->tunnel = tunnel;
1140 eo->mq = GNUNET_MESH_mq_create (tunnel); 1140 eo->mq = GNUNET_MESH_mq_create (tunnel);
1141 1141
1142 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1142 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1143 "evaluating union operation, (app %s)\n", 1143 "evaluating union operation, (app %s)\n",
1144 GNUNET_h2s (&eo->spec->app_id)); 1144 GNUNET_h2s (&eo->spec->app_id));
1145 1145
1146 /* we started the operation, thus we have to send the operation request */ 1146 /* we started the operation, thus we have to send the operation request */
@@ -1201,10 +1201,10 @@ union_set_create (void)
1201 struct SetState *set_state; 1201 struct SetState *set_state;
1202 1202
1203 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "union set created\n"); 1203 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "union set created\n");
1204 1204
1205 set_state = GNUNET_new (struct SetState); 1205 set_state = GNUNET_new (struct SetState);
1206 set_state->se = strata_estimator_create (SE_STRATA_COUNT, 1206 set_state->se = strata_estimator_create (SE_STRATA_COUNT,
1207 SE_IBF_SIZE, SE_IBF_HASH_NUM); 1207 SE_IBF_SIZE, SE_IBF_HASH_NUM);
1208 return set_state; 1208 return set_state;
1209} 1209}
1210 1210