diff options
Diffstat (limited to 'src/reclaim/reclaim_attribute.c')
-rw-r--r-- | src/reclaim/reclaim_attribute.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/src/reclaim/reclaim_attribute.c b/src/reclaim/reclaim_attribute.c index 560267578..b5c41b2d1 100644 --- a/src/reclaim/reclaim_attribute.c +++ b/src/reclaim/reclaim_attribute.c | |||
@@ -282,14 +282,6 @@ GNUNET_RECLAIM_attribute_new (const char *attr_name, | |||
282 | } | 282 | } |
283 | 283 | ||
284 | 284 | ||
285 | /** | ||
286 | * Add a new attribute to a claim list | ||
287 | * | ||
288 | * @param attr_name the name of the new attribute claim | ||
289 | * @param type the type of the claim | ||
290 | * @param data claim payload | ||
291 | * @param data_size claim payload size | ||
292 | */ | ||
293 | void | 285 | void |
294 | GNUNET_RECLAIM_attribute_list_add ( | 286 | GNUNET_RECLAIM_attribute_list_add ( |
295 | struct GNUNET_RECLAIM_AttributeList *al, | 287 | struct GNUNET_RECLAIM_AttributeList *al, |
@@ -333,16 +325,9 @@ GNUNET_RECLAIM_attribute_list_serialize_get_size ( | |||
333 | } | 325 | } |
334 | 326 | ||
335 | 327 | ||
336 | /** | ||
337 | * Serialize an attribute list | ||
338 | * | ||
339 | * @param attrs the attribute list to serialize | ||
340 | * @param result the serialized attribute | ||
341 | * @return length of serialized data | ||
342 | */ | ||
343 | size_t | 328 | size_t |
344 | GNUNET_RECLAIM_attribute_list_serialize ( | 329 | GNUNET_RECLAIM_attribute_list_serialize ( |
345 | const struct GNUNET_RECLAIM_AttributeList *al, | 330 | const struct GNUNET_RECLAIM_AttributeList *attrs, |
346 | char *result) | 331 | char *result) |
347 | { | 332 | { |
348 | struct GNUNET_RECLAIM_AttributeListEntry *ale; | 333 | struct GNUNET_RECLAIM_AttributeListEntry *ale; |
@@ -351,7 +336,7 @@ GNUNET_RECLAIM_attribute_list_serialize ( | |||
351 | char *write_ptr; | 336 | char *write_ptr; |
352 | write_ptr = result; | 337 | write_ptr = result; |
353 | total_len = 0; | 338 | total_len = 0; |
354 | for (ale = al->list_head; NULL != ale; ale = ale->next) | 339 | for (ale = attrs->list_head; NULL != ale; ale = ale->next) |
355 | { | 340 | { |
356 | GNUNET_assert (NULL != ale->attribute); | 341 | GNUNET_assert (NULL != ale->attribute); |
357 | len = GNUNET_RECLAIM_attribute_serialize (ale->attribute, write_ptr); | 342 | len = GNUNET_RECLAIM_attribute_serialize (ale->attribute, write_ptr); |
@@ -404,21 +389,16 @@ GNUNET_RECLAIM_attribute_list_deserialize (const char *data, size_t data_size) | |||
404 | } | 389 | } |
405 | 390 | ||
406 | 391 | ||
407 | /** | ||
408 | * Make a (deep) copy of a claim list | ||
409 | * @param attrs claim list to copy | ||
410 | * @return copied claim list | ||
411 | */ | ||
412 | struct GNUNET_RECLAIM_AttributeList * | 392 | struct GNUNET_RECLAIM_AttributeList * |
413 | GNUNET_RECLAIM_attribute_list_dup ( | 393 | GNUNET_RECLAIM_attribute_list_dup ( |
414 | const struct GNUNET_RECLAIM_AttributeList *al) | 394 | const struct GNUNET_RECLAIM_AttributeList *attrs) |
415 | { | 395 | { |
416 | struct GNUNET_RECLAIM_AttributeListEntry *ale; | 396 | struct GNUNET_RECLAIM_AttributeListEntry *ale; |
417 | struct GNUNET_RECLAIM_AttributeListEntry *result_ale; | 397 | struct GNUNET_RECLAIM_AttributeListEntry *result_ale; |
418 | struct GNUNET_RECLAIM_AttributeList *result; | 398 | struct GNUNET_RECLAIM_AttributeList *result; |
419 | 399 | ||
420 | result = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); | 400 | result = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); |
421 | for (ale = al->list_head; NULL != ale; ale = ale->next) | 401 | for (ale = attrs->list_head; NULL != ale; ale = ale->next) |
422 | { | 402 | { |
423 | result_ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); | 403 | result_ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); |
424 | GNUNET_assert (NULL != ale->attribute); | 404 | GNUNET_assert (NULL != ale->attribute); |
@@ -441,11 +421,6 @@ GNUNET_RECLAIM_attribute_list_dup ( | |||
441 | } | 421 | } |
442 | 422 | ||
443 | 423 | ||
444 | /** | ||
445 | * Destroy claim list | ||
446 | * | ||
447 | * @param attrs list to destroy | ||
448 | */ | ||
449 | void | 424 | void |
450 | GNUNET_RECLAIM_attribute_list_destroy ( | 425 | GNUNET_RECLAIM_attribute_list_destroy ( |
451 | struct GNUNET_RECLAIM_AttributeList *al) | 426 | struct GNUNET_RECLAIM_AttributeList *al) |