diff options
Diffstat (limited to 'src/reclaim/reclaim_api.c')
-rw-r--r-- | src/reclaim/reclaim_api.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index 847abb58a..5a3bee218 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -511,13 +511,17 @@ handle_consume_ticket_result (void *cls, | |||
511 | { | 511 | { |
512 | for (le = attrs->list_head; NULL != le; le = le->next) | 512 | for (le = attrs->list_head; NULL != le; le = le->next) |
513 | { | 513 | { |
514 | if (le->reference != NULL && le->attest == NULL) | 514 | if ((le->reference != NULL) && (le->attest == NULL)) |
515 | { | 515 | { |
516 | for (le2 = attrs->list_head; NULL != le2; le2 = le2->next) | 516 | for (le2 = attrs->list_head; NULL != le2; le2 = le2->next) |
517 | { | 517 | { |
518 | if (le2->attest != NULL && le2->attest->id == le->reference->id_attest) | 518 | if ((le2->attest != NULL) && |
519 | (0 == memcmp (&le2->attest->id, | ||
520 | &le->reference->id_attest, | ||
521 | sizeof (le2->attest->id)))) | ||
519 | { | 522 | { |
520 | op->ar_cb (op->cls, &msg->identity, le->claim, le2->attest, le->reference); | 523 | op->ar_cb (op->cls, &msg->identity, le->claim, le2->attest, |
524 | le->reference); | ||
521 | break; | 525 | break; |
522 | } | 526 | } |
523 | 527 | ||
@@ -637,6 +641,7 @@ handle_attribute_result (void *cls, const struct AttributeResultMessage *msg) | |||
637 | GNUNET_assert (0); | 641 | GNUNET_assert (0); |
638 | } | 642 | } |
639 | 643 | ||
644 | |||
640 | /** | 645 | /** |
641 | * Handle an incoming message of type | 646 | * Handle an incoming message of type |
642 | * #GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT | 647 | * #GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT |
@@ -736,6 +741,7 @@ handle_attestation_result (void *cls, const struct AttributeResultMessage *msg) | |||
736 | GNUNET_assert (0); | 741 | GNUNET_assert (0); |
737 | } | 742 | } |
738 | 743 | ||
744 | |||
739 | /** | 745 | /** |
740 | * Handle an incoming message of type | 746 | * Handle an incoming message of type |
741 | * #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT | 747 | * #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT |
@@ -762,6 +768,7 @@ check_reference_result (void *cls, const struct ReferenceResultMessage *msg) | |||
762 | return GNUNET_OK; | 768 | return GNUNET_OK; |
763 | } | 769 | } |
764 | 770 | ||
771 | |||
765 | /** | 772 | /** |
766 | * Handle an incoming message of type | 773 | * Handle an incoming message of type |
767 | * #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT | 774 | * #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT |
@@ -841,6 +848,7 @@ handle_reference_result (void *cls, const struct ReferenceResultMessage *msg) | |||
841 | GNUNET_assert (0); | 848 | GNUNET_assert (0); |
842 | } | 849 | } |
843 | 850 | ||
851 | |||
844 | /** | 852 | /** |
845 | * Handle an incoming message of type | 853 | * Handle an incoming message of type |
846 | * #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT | 854 | * #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT |
@@ -1150,6 +1158,7 @@ GNUNET_RECLAIM_attribute_delete ( | |||
1150 | return op; | 1158 | return op; |
1151 | } | 1159 | } |
1152 | 1160 | ||
1161 | |||
1153 | /** | 1162 | /** |
1154 | * Store an attestation. If the attestation is already present, | 1163 | * Store an attestation. If the attestation is already present, |
1155 | * it is replaced with the new attestation. | 1164 | * it is replaced with the new attestation. |
@@ -1197,6 +1206,7 @@ GNUNET_RECLAIM_attestation_store ( | |||
1197 | return op; | 1206 | return op; |
1198 | } | 1207 | } |
1199 | 1208 | ||
1209 | |||
1200 | /** | 1210 | /** |
1201 | * Delete an attestation. Tickets used to share this attestation are updated | 1211 | * Delete an attestation. Tickets used to share this attestation are updated |
1202 | * accordingly. | 1212 | * accordingly. |
@@ -1240,6 +1250,7 @@ GNUNET_RECLAIM_attestation_delete ( | |||
1240 | return op; | 1250 | return op; |
1241 | } | 1251 | } |
1242 | 1252 | ||
1253 | |||
1243 | /** | 1254 | /** |
1244 | * Store an attestation reference. If the reference is already present, | 1255 | * Store an attestation reference. If the reference is already present, |
1245 | * it is replaced with the new reference. | 1256 | * it is replaced with the new reference. |
@@ -1286,6 +1297,7 @@ GNUNET_RECLAIM_attestation_reference_store ( | |||
1286 | return op; | 1297 | return op; |
1287 | } | 1298 | } |
1288 | 1299 | ||
1300 | |||
1289 | /** | 1301 | /** |
1290 | * Delete an attestation reference. Tickets used to share this reference are updated | 1302 | * Delete an attestation reference. Tickets used to share this reference are updated |
1291 | * accordingly. | 1303 | * accordingly. |
@@ -1330,6 +1342,7 @@ GNUNET_RECLAIM_attestation_reference_delete ( | |||
1330 | return op; | 1342 | return op; |
1331 | } | 1343 | } |
1332 | 1344 | ||
1345 | |||
1333 | /** | 1346 | /** |
1334 | * List all attributes for a local identity. | 1347 | * List all attributes for a local identity. |
1335 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` | 1348 | * This MUST lock the `struct GNUNET_RECLAIM_Handle` |