aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-07 15:36:43 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-09 20:38:11 +0100
commit141a279fb55bc9b11aaa765ca3ad54689003e291 (patch)
tree2519ee820288fae481ae972963dea24fd86ffb59 /src/reclaim/gnunet-service-reclaim.c
parentd06446f143610790d9a0530d524d8e9db2a03b8c (diff)
downloadgnunet-141a279fb55bc9b11aaa765ca3ad54689003e291.tar.gz
gnunet-141a279fb55bc9b11aaa765ca3ad54689003e291.zip
bugfixes; CLI improvements
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c
index eb8727f8f..4521e5c81 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -842,6 +842,7 @@ static void
842consume_result_cb (void *cls, 842consume_result_cb (void *cls,
843 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 843 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
844 const struct GNUNET_RECLAIM_AttributeList *attrs, 844 const struct GNUNET_RECLAIM_AttributeList *attrs,
845 const struct GNUNET_RECLAIM_AttestationList *attests,
845 int32_t success, 846 int32_t success,
846 const char *emsg) 847 const char *emsg)
847{ 848{
@@ -850,23 +851,28 @@ consume_result_cb (void *cls,
850 struct GNUNET_MQ_Envelope *env; 851 struct GNUNET_MQ_Envelope *env;
851 char *data_tmp; 852 char *data_tmp;
852 size_t attrs_len; 853 size_t attrs_len;
854 size_t attests_len;
853 855
854 if (GNUNET_OK != success) 856 if (GNUNET_OK != success)
855 { 857 {
856 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error consuming ticket: %s\n", emsg); 858 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error consuming ticket: %s\n", emsg);
857 } 859 }
858 attrs_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs); 860 attrs_len = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs);
861 attests_len = GNUNET_RECLAIM_attestation_list_serialize_get_size (attests);
859 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 862 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
860 "Sending CONSUME_TICKET_RESULT message\n"); 863 "Sending CONSUME_TICKET_RESULT message\n");
861 env = GNUNET_MQ_msg_extra (crm, 864 env = GNUNET_MQ_msg_extra (crm,
862 attrs_len, 865 attrs_len + attests_len,
863 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT); 866 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT);
864 crm->id = htonl (cop->r_id); 867 crm->id = htonl (cop->r_id);
865 crm->attrs_len = htons (attrs_len); 868 crm->attrs_len = htons (attrs_len);
869 crm->attestations_len = htons (attests_len);
866 crm->identity = *identity; 870 crm->identity = *identity;
867 crm->result = htonl (success); 871 crm->result = htonl (success);
868 data_tmp = (char *) &crm[1]; 872 data_tmp = (char *) &crm[1];
869 GNUNET_RECLAIM_attribute_list_serialize (attrs, data_tmp); 873 GNUNET_RECLAIM_attribute_list_serialize (attrs, data_tmp);
874 data_tmp += attrs_len;
875 GNUNET_RECLAIM_attestation_list_serialize (attests, data_tmp);
870 GNUNET_MQ_send (cop->client->mq, env); 876 GNUNET_MQ_send (cop->client->mq, env);
871 GNUNET_CONTAINER_DLL_remove (cop->client->consume_op_head, 877 GNUNET_CONTAINER_DLL_remove (cop->client->consume_op_head,
872 cop->client->consume_op_tail, 878 cop->client->consume_op_tail,