diff options
author | Markus Voggenreiter <Markus.Voggenreiter@tum.de> | 2019-11-27 12:30:49 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-01-13 13:31:05 +0100 |
commit | cb08bbcbefc98afe6b8c7600bb0dfb1241343cff (patch) | |
tree | ec801cb4e772bd245ca8d22f19bc751ca67d2737 /src/reclaim/reclaim_api.c | |
parent | c0fce9ca75973a646f80372fcc08c059818ba548 (diff) | |
download | gnunet-cb08bbcbefc98afe6b8c7600bb0dfb1241343cff.tar.gz gnunet-cb08bbcbefc98afe6b8c7600bb0dfb1241343cff.zip |
Basic Functionality Implemented
Diffstat (limited to 'src/reclaim/reclaim_api.c')
-rw-r--r-- | src/reclaim/reclaim_api.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index 75ef22c8c..847abb58a 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -486,7 +486,7 @@ handle_consume_ticket_result (void *cls, | |||
486 | uint32_t r_id = ntohl (msg->id); | 486 | uint32_t r_id = ntohl (msg->id); |
487 | 487 | ||
488 | attrs_len = ntohs (msg->attrs_len); | 488 | attrs_len = ntohs (msg->attrs_len); |
489 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing attribute result.\n"); | 489 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Processing ticket result.\n"); |
490 | 490 | ||
491 | 491 | ||
492 | for (op = h->op_head; NULL != op; op = op->next) | 492 | for (op = h->op_head; NULL != op; op = op->next) |
@@ -498,6 +498,7 @@ handle_consume_ticket_result (void *cls, | |||
498 | { | 498 | { |
499 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; | 499 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; |
500 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; | 500 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le; |
501 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le2; | ||
501 | attrs = | 502 | attrs = |
502 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char *) &msg[1], attrs_len); | 503 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char *) &msg[1], attrs_len); |
503 | if (NULL != op->ar_cb) | 504 | if (NULL != op->ar_cb) |
@@ -509,7 +510,20 @@ handle_consume_ticket_result (void *cls, | |||
509 | else | 510 | else |
510 | { | 511 | { |
511 | for (le = attrs->list_head; NULL != le; le = le->next) | 512 | for (le = attrs->list_head; NULL != le; le = le->next) |
512 | op->ar_cb (op->cls, &msg->identity, le->claim, NULL, NULL); | 513 | { |
514 | if (le->reference != NULL && le->attest == NULL) | ||
515 | { | ||
516 | for (le2 = attrs->list_head; NULL != le2; le2 = le2->next) | ||
517 | { | ||
518 | if (le2->attest != NULL && le2->attest->id == le->reference->id_attest) | ||
519 | { | ||
520 | op->ar_cb (op->cls, &msg->identity, le->claim, le2->attest, le->reference); | ||
521 | break; | ||
522 | } | ||
523 | |||
524 | } | ||
525 | } | ||
526 | } | ||
513 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (attrs); | 527 | GNUNET_RECLAIM_ATTRIBUTE_list_destroy (attrs); |
514 | attrs = NULL; | 528 | attrs = NULL; |
515 | } | 529 | } |