aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/consensus/consensus_api.c5
-rw-r--r--src/consensus/gnunet-service-consensus.c17
-rw-r--r--src/dv/gnunet-service-dv.c2
-rw-r--r--src/include/gnunet_set_service.h2
-rw-r--r--src/revocation/gnunet-service-revocation.c8
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct.c4
-rw-r--r--src/secretsharing/gnunet-service-secretsharing.c2
-rw-r--r--src/set/gnunet-service-set.c2
-rw-r--r--src/set/gnunet-service-set_intersection.c4
-rw-r--r--src/set/gnunet-service-set_union.c4
-rw-r--r--src/set/gnunet-set-profiler.c13
-rw-r--r--src/set/set_api.c12
-rw-r--r--src/set/test_set_api.c6
-rw-r--r--src/set/test_set_intersection_result_full.c6
-rw-r--r--src/set/test_set_union_result_full.c6
15 files changed, 50 insertions, 43 deletions
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c
index 6988c7b6d..7b52c2041 100644
--- a/src/consensus/consensus_api.c
+++ b/src/consensus/consensus_api.c
@@ -116,9 +116,10 @@ handle_new_element (void *cls,
116 = (const struct GNUNET_CONSENSUS_ElementMessage *) mh; 116 = (const struct GNUNET_CONSENSUS_ElementMessage *) mh;
117 struct GNUNET_SET_Element element; 117 struct GNUNET_SET_Element element;
118 118
119 LOG (GNUNET_ERROR_TYPE_DEBUG, "received new element\n"); 119 LOG (GNUNET_ERROR_TYPE_DEBUG,
120 "received new element\n");
120 121
121 element.type = msg->element_type; 122 element.element_type = msg->element_type;
122 element.size = ntohs (msg->header.size) - sizeof (struct GNUNET_CONSENSUS_ElementMessage); 123 element.size = ntohs (msg->header.size) - sizeof (struct GNUNET_CONSENSUS_ElementMessage);
123 element.data = &msg[1]; 124 element.data = &msg[1];
124 125
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index adf81ac17..2659b939d 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -377,12 +377,12 @@ destroy_session (struct ConsensusSession *session)
377 377
378 378
379/** 379/**
380 * Iterator for set elements. 380 * Iterator for set elements. [FIXME: bad comment]
381 * 381 *
382 * @param cls closure 382 * @param cls closure
383 * @param element the current element, NULL if all elements have been 383 * @param element the current element, NULL if all elements have been
384 * iterated over 384 * iterated over
385 * @return GNUNET_YES to continue iterating, GNUNET_NO to stop. 385 * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop.
386 */ 386 */
387static int 387static int
388send_to_client_iter (void *cls, 388send_to_client_iter (void *cls,
@@ -395,17 +395,20 @@ send_to_client_iter (void *cls,
395 { 395 {
396 struct GNUNET_CONSENSUS_ElementMessage *m; 396 struct GNUNET_CONSENSUS_ElementMessage *m;
397 397
398 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%d: got element for client\n", 398 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
399 "P%d: got element for client\n",
399 session->local_peer_idx); 400 session->local_peer_idx);
400 401
401 ev = GNUNET_MQ_msg_extra (m, element->size, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT); 402 ev = GNUNET_MQ_msg_extra (m, element->size,
402 m->element_type = htons (element->type); 403 GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT);
404 m->element_type = htons (element->element_type);
403 memcpy (&m[1], element->data, element->size); 405 memcpy (&m[1], element->data, element->size);
404 GNUNET_MQ_send (session->client_mq, ev); 406 GNUNET_MQ_send (session->client_mq, ev);
405 } 407 }
406 else 408 else
407 { 409 {
408 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "P%d: finished iterating elements for client\n", 410 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
411 "P%d: finished iterating elements for client\n",
409 session->local_peer_idx); 412 session->local_peer_idx);
410 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE); 413 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE);
411 GNUNET_MQ_send (session->client_mq, ev); 414 GNUNET_MQ_send (session->client_mq, ev);
@@ -1252,7 +1255,7 @@ client_insert (void *cls,
1252 } 1255 }
1253 1256
1254 element = GNUNET_malloc (sizeof (struct GNUNET_SET_Element) + element_size); 1257 element = GNUNET_malloc (sizeof (struct GNUNET_SET_Element) + element_size);
1255 element->type = msg->element_type; 1258 element->element_type = msg->element_type;
1256 element->size = element_size; 1259 element->size = element_size;
1257 memcpy (&element[1], &msg[1], element_size); 1260 memcpy (&element[1], &msg[1], element_size);
1258 element->data = &element[1]; 1261 element->data = &element[1];
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index ad00264d0..478c0cc12 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -852,7 +852,7 @@ build_set (void *cls)
852 target = &route->target; 852 target = &route->target;
853 GNUNET_assert (ntohl (target->distance) < DEFAULT_FISHEYE_DEPTH); 853 GNUNET_assert (ntohl (target->distance) < DEFAULT_FISHEYE_DEPTH);
854 element.size = sizeof (struct Target); 854 element.size = sizeof (struct Target);
855 element.type = htons (0); /* do we need this? */ 855 element.element_type = htons (0);
856 element.data = target; 856 element.data = target;
857 857
858 /* Find next non-NULL entry */ 858 /* Find next non-NULL entry */
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index 1ff8d85d5..c0e65cb72 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -161,7 +161,7 @@ struct GNUNET_SET_Element
161 /** 161 /**
162 * Application-specific element type. 162 * Application-specific element type.
163 */ 163 */
164 uint16_t type; 164 uint16_t element_type;
165 165
166 /** 166 /**
167 * Actual data of the element 167 * Actual data of the element
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 0c75c14c3..7ef5cbc81 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -268,8 +268,8 @@ publicize_rm (const struct RevokeMessage *rm)
268 GNUNET_CONTAINER_multihashmap_contains (revocation_map, 268 GNUNET_CONTAINER_multihashmap_contains (revocation_map,
269 &hc)) 269 &hc))
270 { 270 {
271 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 271 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
272 _("Duplicate revocation received from peer. Ignored.\n")); 272 "Duplicate revocation received from peer. Ignored.\n");
273 return GNUNET_OK; 273 return GNUNET_OK;
274 } 274 }
275 if (GNUNET_OK != 275 if (GNUNET_OK !=
@@ -304,7 +304,7 @@ publicize_rm (const struct RevokeMessage *rm)
304 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 304 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
305 /* add to set for future connections */ 305 /* add to set for future connections */
306 e.size = htons (rm->header.size); 306 e.size = htons (rm->header.size);
307 e.type = 0; 307 e.element_type = 0;
308 e.data = rm; 308 e.data = rm;
309 if (GNUNET_OK != 309 if (GNUNET_OK !=
310 GNUNET_SET_add_element (revocation_set, 310 GNUNET_SET_add_element (revocation_set,
@@ -413,7 +413,7 @@ add_revocation (void *cls,
413 GNUNET_break_op (0); 413 GNUNET_break_op (0);
414 return; 414 return;
415 } 415 }
416 if (0 != element->type) 416 if (0 != element->element_type)
417 { 417 {
418 GNUNET_STATISTICS_update (stats, 418 GNUNET_STATISTICS_update (stats,
419 "# unsupported revocations received via set union", 419 "# unsupported revocations received via set union",
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c
index 07eb565fb..170bf89a6 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct.c
@@ -1699,7 +1699,7 @@ handle_client_message_multipart (void *cls,
1699 } 1699 }
1700 set_elem.data = &elem->key; 1700 set_elem.data = &elem->key;
1701 set_elem.size = sizeof (elem->key); 1701 set_elem.size = sizeof (elem->key);
1702 set_elem.type = 0; /* do we REALLY need this? */ 1702 set_elem.element_type = 0; /* do we REALLY need this? */
1703 GNUNET_SET_add_element (s->intersection_set, &set_elem, NULL, NULL); 1703 GNUNET_SET_add_element (s->intersection_set, &set_elem, NULL, NULL);
1704 s->used_element_count++; 1704 s->used_element_count++;
1705 } 1705 }
@@ -1812,7 +1812,7 @@ handle_client_message (void *cls,
1812 } 1812 }
1813 set_elem.data = &elem->key; 1813 set_elem.data = &elem->key;
1814 set_elem.size = sizeof (elem->key); 1814 set_elem.size = sizeof (elem->key);
1815 set_elem.type = 0; /* do we REALLY need this? */ 1815 set_elem.element_type = 0;
1816 GNUNET_SET_add_element (s->intersection_set, &set_elem, NULL, NULL); 1816 GNUNET_SET_add_element (s->intersection_set, &set_elem, NULL, NULL);
1817 s->used_element_count++; 1817 s->used_element_count++;
1818 } 1818 }
diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c
index ebf078982..3a0461008 100644
--- a/src/secretsharing/gnunet-service-secretsharing.c
+++ b/src/secretsharing/gnunet-service-secretsharing.c
@@ -2028,7 +2028,7 @@ insert_decrypt_element (struct DecryptSession *ds)
2028 2028
2029 element.data = (void *) &d; 2029 element.data = (void *) &d;
2030 element.size = sizeof (struct GNUNET_SECRETSHARING_DecryptData); 2030 element.size = sizeof (struct GNUNET_SECRETSHARING_DecryptData);
2031 element.type = 0; 2031 element.element_type = 0;
2032 2032
2033 d.ciphertext = ds->ciphertext; 2033 d.ciphertext = ds->ciphertext;
2034 d.peer = my_peer; 2034 d.peer = my_peer;
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 452ded8a3..b050cb465 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -694,7 +694,7 @@ send_client_element (struct Set *set)
694 ee->element.size, 694 ee->element.size,
695 GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT); 695 GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT);
696 memcpy (&msg[1], ee->element.data, ee->element.size); 696 memcpy (&msg[1], ee->element.data, ee->element.size);
697 msg->element_type = ee->element.type; 697 msg->element_type = ee->element.element_type;
698 } 698 }
699 GNUNET_MQ_send (set->client_mq, ev); 699 GNUNET_MQ_send (set->client_mq, ev);
700} 700}
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c
index 606776154..4a252f4be 100644
--- a/src/set/gnunet-service-set_intersection.c
+++ b/src/set/gnunet-service-set_intersection.c
@@ -181,7 +181,7 @@ send_client_element (struct Operation *op,
181 } 181 }
182 rm->result_status = htons (GNUNET_SET_STATUS_OK); 182 rm->result_status = htons (GNUNET_SET_STATUS_OK);
183 rm->request_id = htonl (op->spec->client_request_id); 183 rm->request_id = htonl (op->spec->client_request_id);
184 rm->element_type = element->type; 184 rm->element_type = element->element_type;
185 memcpy (&rm[1], element->data, element->size); 185 memcpy (&rm[1], element->data, element->size);
186 GNUNET_MQ_send (op->spec->set->client_mq, ev); 186 GNUNET_MQ_send (op->spec->set->client_mq, ev);
187} 187}
@@ -572,7 +572,7 @@ send_remaining_elements (void *cls)
572 572
573 rm->result_status = htons (GNUNET_SET_STATUS_OK); 573 rm->result_status = htons (GNUNET_SET_STATUS_OK);
574 rm->request_id = htonl (op->spec->client_request_id); 574 rm->request_id = htonl (op->spec->client_request_id);
575 rm->element_type = element->type; 575 rm->element_type = element->element_type;
576 memcpy (&rm[1], element->data, element->size); 576 memcpy (&rm[1], element->data, element->size);
577 577
578 GNUNET_MQ_notify_sent (ev, send_remaining_elements, op); 578 GNUNET_MQ_notify_sent (ev, send_remaining_elements, op);
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index 77e8502d6..10ad1c545 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -965,7 +965,7 @@ send_client_element (struct Operation *op,
965 } 965 }
966 rm->result_status = htons (GNUNET_SET_STATUS_OK); 966 rm->result_status = htons (GNUNET_SET_STATUS_OK);
967 rm->request_id = htonl (op->spec->client_request_id); 967 rm->request_id = htonl (op->spec->client_request_id);
968 rm->element_type = element->type; 968 rm->element_type = element->element_type;
969 memcpy (&rm[1], element->data, element->size); 969 memcpy (&rm[1], element->data, element->size);
970 GNUNET_MQ_send (op->spec->set->client_mq, ev); 970 GNUNET_MQ_send (op->spec->set->client_mq, ev);
971} 971}
@@ -1036,7 +1036,7 @@ send_remaining_elements (void *cls)
1036 } 1036 }
1037 rm->result_status = htons (GNUNET_SET_STATUS_OK); 1037 rm->result_status = htons (GNUNET_SET_STATUS_OK);
1038 rm->request_id = htonl (op->spec->client_request_id); 1038 rm->request_id = htonl (op->spec->client_request_id);
1039 rm->element_type = element->type; 1039 rm->element_type = element->element_type;
1040 memcpy (&rm[1], element->data, element->size); 1040 memcpy (&rm[1], element->data, element->size);
1041 if (ke->next_colliding == NULL) 1041 if (ke->next_colliding == NULL)
1042 { 1042 {
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c
index f1b7b4b14..3bff45254 100644
--- a/src/set/gnunet-set-profiler.c
+++ b/src/set/gnunet-set-profiler.c
@@ -143,18 +143,19 @@ set_listen_cb (void *cls,
143{ 143{
144 if (NULL == request) 144 if (NULL == request)
145 { 145 {
146 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "listener failed\n"); 146 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
147 "listener failed\n");
147 return; 148 return;
148 } 149 }
149 GNUNET_assert (NULL == info2.oh); 150 GNUNET_assert (NULL == info2.oh);
150 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "set listen cb called\n"); 151 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
152 "set listen cb called\n");
151 info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_ADDED, 153 info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_ADDED,
152 set_result_cb, &info2); 154 set_result_cb, &info2);
153 GNUNET_SET_commit (info2.oh, info2.set); 155 GNUNET_SET_commit (info2.oh, info2.set);
154} 156}
155 157
156 158
157
158static int 159static int
159set_insert_iterator (void *cls, 160set_insert_iterator (void *cls,
160 const struct GNUNET_HashCode *key, 161 const struct GNUNET_HashCode *key,
@@ -163,8 +164,9 @@ set_insert_iterator (void *cls,
163 struct GNUNET_SET_Handle *set = cls; 164 struct GNUNET_SET_Handle *set = cls;
164 struct GNUNET_SET_Element *el; 165 struct GNUNET_SET_Element *el;
165 166
166 el = GNUNET_malloc (sizeof *el + sizeof *key); 167 el = GNUNET_malloc (sizeof (struct GNUNET_SET_Element) +
167 el->type = 0; 168 sizeof (struct GNUNET_HashCode));
169 el->element_type = 0;
168 memcpy (&el[1], key, sizeof *key); 170 memcpy (&el[1], key, sizeof *key);
169 el->data = &el[1]; 171 el->data = &el[1];
170 el->size = sizeof *key; 172 el->size = sizeof *key;
@@ -205,6 +207,7 @@ handle_shutdown (void *cls,
205 } 207 }
206} 208}
207 209
210
208static void 211static void
209run (void *cls, char *const *args, const char *cfgfile, 212run (void *cls, char *const *args, const char *cfgfile,
210 const struct GNUNET_CONFIGURATION_Handle *cfg) 213 const struct GNUNET_CONFIGURATION_Handle *cfg)
diff --git a/src/set/set_api.c b/src/set/set_api.c
index 10421ebda..1ef0cc50c 100644
--- a/src/set/set_api.c
+++ b/src/set/set_api.c
@@ -234,7 +234,7 @@ handle_iter_element (void *cls, const struct GNUNET_MessageHeader *mh)
234 return; 234 return;
235 235
236 element.size = ntohs (mh->size) - sizeof (struct GNUNET_SET_IterResponseMessage); 236 element.size = ntohs (mh->size) - sizeof (struct GNUNET_SET_IterResponseMessage);
237 element.type = htons (msg->element_type); 237 element.element_type = htons (msg->element_type);
238 element.data = &msg[1]; 238 element.data = &msg[1];
239 set->iterator (set->iterator_cls, &element); 239 set->iterator (set->iterator_cls, &element);
240 ev = GNUNET_MQ_msg (ack_msg, GNUNET_MESSAGE_TYPE_SET_ITER_ACK); 240 ev = GNUNET_MQ_msg (ack_msg, GNUNET_MESSAGE_TYPE_SET_ITER_ACK);
@@ -306,7 +306,7 @@ handle_result (void *cls, const struct GNUNET_MessageHeader *mh)
306 306
307 e.data = &msg[1]; 307 e.data = &msg[1];
308 e.size = ntohs (mh->size) - sizeof (struct GNUNET_SET_ResultMessage); 308 e.size = ntohs (mh->size) - sizeof (struct GNUNET_SET_ResultMessage);
309 e.type = msg->element_type; 309 e.element_type = msg->element_type;
310 if (NULL != oh->result_cb) 310 if (NULL != oh->result_cb)
311 oh->result_cb (oh->result_cls, &e, result_status); 311 oh->result_cb (oh->result_cls, &e, result_status);
312} 312}
@@ -552,7 +552,7 @@ GNUNET_SET_add_element (struct GNUNET_SET_Handle *set,
552 } 552 }
553 553
554 mqm = GNUNET_MQ_msg_extra (msg, element->size, GNUNET_MESSAGE_TYPE_SET_ADD); 554 mqm = GNUNET_MQ_msg_extra (msg, element->size, GNUNET_MESSAGE_TYPE_SET_ADD);
555 msg->element_type = element->type; 555 msg->element_type = element->element_type;
556 memcpy (&msg[1], element->data, element->size); 556 memcpy (&msg[1], element->data, element->size);
557 GNUNET_MQ_notify_sent (mqm, cont, cont_cls); 557 GNUNET_MQ_notify_sent (mqm, cont, cont_cls);
558 GNUNET_MQ_send (set->mq, mqm); 558 GNUNET_MQ_send (set->mq, mqm);
@@ -569,8 +569,8 @@ GNUNET_SET_add_element (struct GNUNET_SET_Handle *set,
569 * @param set set to remove element from 569 * @param set set to remove element from
570 * @param element element to remove from the set 570 * @param element element to remove from the set
571 * @param cont continuation called after the element has been removed 571 * @param cont continuation called after the element has been removed
572 * @param cont_cls closure for cont 572 * @param cont_cls closure for @a cont
573 * @return GNUNET_OK on success, GNUNET_SYSERR if the 573 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the
574 * set is invalid (e.g. the set service crashed) 574 * set is invalid (e.g. the set service crashed)
575 */ 575 */
576int 576int
@@ -590,7 +590,7 @@ GNUNET_SET_remove_element (struct GNUNET_SET_Handle *set,
590 } 590 }
591 591
592 mqm = GNUNET_MQ_msg_extra (msg, element->size, GNUNET_MESSAGE_TYPE_SET_REMOVE); 592 mqm = GNUNET_MQ_msg_extra (msg, element->size, GNUNET_MESSAGE_TYPE_SET_REMOVE);
593 msg->element_type = element->type; 593 msg->element_type = element->element_type;
594 memcpy (&msg[1], element->data, element->size); 594 memcpy (&msg[1], element->data, element->size);
595 GNUNET_MQ_notify_sent (mqm, cont, cont_cls); 595 GNUNET_MQ_notify_sent (mqm, cont, cont_cls);
596 GNUNET_MQ_send (set->mq, mqm); 596 GNUNET_MQ_send (set->mq, mqm);
diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c
index 63188eb60..37645cbd8 100644
--- a/src/set/test_set_api.c
+++ b/src/set/test_set_api.c
@@ -149,7 +149,7 @@ init_set2 (void *cls)
149 149
150 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "initializing set 2\n"); 150 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "initializing set 2\n");
151 151
152 element.type = 0; 152 element.element_type = 0;
153 153
154 element.data = "hello"; 154 element.data = "hello";
155 element.size = strlen(element.data); 155 element.size = strlen(element.data);
@@ -171,7 +171,7 @@ init_set1 (void)
171{ 171{
172 struct GNUNET_SET_Element element; 172 struct GNUNET_SET_Element element;
173 173
174 element.type = 0; 174 element.element_type = 0;
175 175
176 element.data = "hello"; 176 element.data = "hello";
177 element.size = strlen(element.data); 177 element.size = strlen(element.data);
@@ -208,7 +208,7 @@ test_iter ()
208 208
209 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_UNION); 209 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_UNION);
210 210
211 element.type = 0; 211 element.element_type = 0;
212 212
213 element.data = "hello"; 213 element.data = "hello";
214 element.size = strlen(element.data); 214 element.size = strlen(element.data);
diff --git a/src/set/test_set_intersection_result_full.c b/src/set/test_set_intersection_result_full.c
index 3b4591bed..567a2ed0d 100644
--- a/src/set/test_set_intersection_result_full.c
+++ b/src/set/test_set_intersection_result_full.c
@@ -152,7 +152,7 @@ init_set2 (void *cls)
152 152
153 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 153 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
154 "initializing set 2\n"); 154 "initializing set 2\n");
155 element.type = 0; 155 element.element_type = 0;
156 element.data = "hello"; 156 element.data = "hello";
157 element.size = strlen(element.data); 157 element.size = strlen(element.data);
158 GNUNET_SET_add_element (set2, &element, NULL, NULL); 158 GNUNET_SET_add_element (set2, &element, NULL, NULL);
@@ -173,7 +173,7 @@ init_set1 (void)
173{ 173{
174 struct GNUNET_SET_Element element; 174 struct GNUNET_SET_Element element;
175 175
176 element.type = 0; 176 element.element_type = 0;
177 element.data = "hello"; 177 element.data = "hello";
178 element.size = strlen(element.data); 178 element.size = strlen(element.data);
179 GNUNET_SET_add_element (set1, &element, NULL, NULL); 179 GNUNET_SET_add_element (set1, &element, NULL, NULL);
@@ -205,7 +205,7 @@ test_iter ()
205 struct GNUNET_SET_Handle *iter_set; 205 struct GNUNET_SET_Handle *iter_set;
206 206
207 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_INTERSECTION); 207 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_INTERSECTION);
208 element.type = 0; 208 element.element_type = 0;
209 element.data = "hello"; 209 element.data = "hello";
210 element.size = strlen(element.data); 210 element.size = strlen(element.data);
211 GNUNET_SET_add_element (iter_set, &element, NULL, NULL); 211 GNUNET_SET_add_element (iter_set, &element, NULL, NULL);
diff --git a/src/set/test_set_union_result_full.c b/src/set/test_set_union_result_full.c
index 1ed7c7bee..f3f389dd0 100644
--- a/src/set/test_set_union_result_full.c
+++ b/src/set/test_set_union_result_full.c
@@ -150,7 +150,7 @@ init_set2 (void *cls)
150 150
151 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "initializing set 2\n"); 151 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "initializing set 2\n");
152 152
153 element.type = 0; 153 element.element_type = 0;
154 154
155 element.data = "hello"; 155 element.data = "hello";
156 element.size = strlen(element.data); 156 element.size = strlen(element.data);
@@ -172,7 +172,7 @@ init_set1 (void)
172{ 172{
173 struct GNUNET_SET_Element element; 173 struct GNUNET_SET_Element element;
174 174
175 element.type = 0; 175 element.element_type = 0;
176 176
177 element.data = "hello"; 177 element.data = "hello";
178 element.size = strlen(element.data); 178 element.size = strlen(element.data);
@@ -209,7 +209,7 @@ test_iter ()
209 209
210 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_UNION); 210 iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_UNION);
211 211
212 element.type = 0; 212 element.element_type = 0;
213 213
214 element.data = "hello"; 214 element.data = "hello";
215 element.size = strlen(element.data); 215 element.size = strlen(element.data);