diff options
Diffstat (limited to 'src/reclaim/reclaim_api.c')
-rw-r--r-- | src/reclaim/reclaim_api.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c index 3820550c9..afab33320 100644 --- a/src/reclaim/reclaim_api.c +++ b/src/reclaim/reclaim_api.c | |||
@@ -801,11 +801,14 @@ handle_attestation_result (void *cls, const struct | |||
801 | static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy; | 801 | static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy; |
802 | struct GNUNET_RECLAIM_Handle *h = cls; | 802 | struct GNUNET_RECLAIM_Handle *h = cls; |
803 | struct GNUNET_RECLAIM_AttestationIterator *it; | 803 | struct GNUNET_RECLAIM_AttestationIterator *it; |
804 | struct GNUNET_RECLAIM_AttributeList *attrs; | ||
804 | struct GNUNET_RECLAIM_Operation *op; | 805 | struct GNUNET_RECLAIM_Operation *op; |
805 | size_t att_len; | 806 | size_t att_len; |
807 | size_t attrs_len; | ||
806 | uint32_t r_id = ntohl (msg->id); | 808 | uint32_t r_id = ntohl (msg->id); |
807 | 809 | ||
808 | att_len = ntohs (msg->attestation_len); | 810 | att_len = ntohs (msg->attestation_len); |
811 | attrs_len = ntohs (msg->attributes_len); | ||
809 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing attestation result.\n"); | 812 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing attestation result.\n"); |
810 | 813 | ||
811 | 814 | ||
@@ -836,7 +839,7 @@ handle_attestation_result (void *cls, const struct | |||
836 | if (NULL != op) | 839 | if (NULL != op) |
837 | { | 840 | { |
838 | if (NULL != op->at_cb) | 841 | if (NULL != op->at_cb) |
839 | op->at_cb (op->cls, NULL, NULL); | 842 | op->at_cb (op->cls, NULL, NULL, NULL); |
840 | GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); | 843 | GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); |
841 | free_op (op); | 844 | free_op (op); |
842 | } | 845 | } |
@@ -846,17 +849,20 @@ handle_attestation_result (void *cls, const struct | |||
846 | { | 849 | { |
847 | struct GNUNET_RECLAIM_Attestation *att; | 850 | struct GNUNET_RECLAIM_Attestation *att; |
848 | att = GNUNET_RECLAIM_attestation_deserialize ((char *) &msg[1], att_len); | 851 | att = GNUNET_RECLAIM_attestation_deserialize ((char *) &msg[1], att_len); |
852 | char *read_ptr = ((char *) &msg[1]) + att_len; | ||
853 | attrs = GNUNET_RECLAIM_attribute_list_deserialize (read_ptr, attrs_len); | ||
849 | if (NULL != it) | 854 | if (NULL != it) |
850 | { | 855 | { |
851 | if (NULL != it->proc) | 856 | if (NULL != it->proc) |
852 | it->proc (it->proc_cls, &msg->identity, att); | 857 | it->proc (it->proc_cls, &msg->identity, att, attrs); |
853 | } | 858 | } |
854 | else if (NULL != op) | 859 | else if (NULL != op) |
855 | { | 860 | { |
856 | if (NULL != op->at_cb) | 861 | if (NULL != op->at_cb) |
857 | op->at_cb (op->cls, &msg->identity, att); | 862 | op->at_cb (op->cls, &msg->identity, att, attrs); |
858 | } | 863 | } |
859 | GNUNET_free (att); | 864 | GNUNET_free (att); |
865 | GNUNET_RECLAIM_attribute_list_destroy (attrs); | ||
860 | return; | 866 | return; |
861 | } | 867 | } |
862 | GNUNET_assert (0); | 868 | GNUNET_assert (0); |