aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-07 21:15:59 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-09 20:38:11 +0100
commite8ea1f3e34e2a07cbe2fd4725e7362027d0c51c3 (patch)
tree5b11a525700872147d92d8195615e4352d6d18b1 /src/reclaim/gnunet-service-reclaim.c
parent5f9f9cae1714eb33e0ee9c824f3d88e6aab8cf63 (diff)
downloadgnunet-e8ea1f3e34e2a07cbe2fd4725e7362027d0c51c3.tar.gz
gnunet-e8ea1f3e34e2a07cbe2fd4725e7362027d0c51c3.zip
add expiration
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c
index ddfe05556..b617d0ec3 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -1865,7 +1865,6 @@ attest_iter_finished (void *cls)
1865 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT); 1865 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
1866 arm->id = htonl (ai->request_id); 1866 arm->id = htonl (ai->request_id);
1867 arm->attestation_len = htons (0); 1867 arm->attestation_len = htons (0);
1868 arm->attributes_len = htons (0);
1869 GNUNET_MQ_send (ai->client->mq, env); 1868 GNUNET_MQ_send (ai->client->mq, env);
1870 GNUNET_CONTAINER_DLL_remove (ai->client->attest_iter_head, 1869 GNUNET_CONTAINER_DLL_remove (ai->client->attest_iter_head,
1871 ai->client->attest_iter_tail, 1870 ai->client->attest_iter_tail,
@@ -1908,10 +1907,8 @@ attest_iter_cb (void *cls,
1908 struct Iterator *ai = cls; 1907 struct Iterator *ai = cls;
1909 struct GNUNET_MQ_Envelope *env; 1908 struct GNUNET_MQ_Envelope *env;
1910 struct AttestationResultMessage *arm; 1909 struct AttestationResultMessage *arm;
1911 struct GNUNET_RECLAIM_AttributeList *attrs;
1912 struct GNUNET_RECLAIM_Attestation *att; 1910 struct GNUNET_RECLAIM_Attestation *att;
1913 char *data_tmp; 1911 char *data_tmp;
1914 size_t attrs_size;
1915 1912
1916 if ((rd_count != 1) || 1913 if ((rd_count != 1) ||
1917 (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd->record_type)) 1914 (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd->record_type))
@@ -1921,24 +1918,18 @@ attest_iter_cb (void *cls,
1921 } 1918 }
1922 att = GNUNET_RECLAIM_attestation_deserialize (rd->data, 1919 att = GNUNET_RECLAIM_attestation_deserialize (rd->data,
1923 rd->data_size); 1920 rd->data_size);
1924 attrs = GNUNET_RECLAIM_attestation_get_attributes (att);
1925 attrs_size = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs);
1926 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n", 1921 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n",
1927 label); 1922 label);
1928 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1923 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1929 "Sending ATTESTATION_RESULT message\n"); 1924 "Sending ATTESTATION_RESULT message\n");
1930 env = GNUNET_MQ_msg_extra (arm, 1925 env = GNUNET_MQ_msg_extra (arm,
1931 rd->data_size + attrs_size, 1926 rd->data_size,
1932 GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT); 1927 GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
1933 arm->id = htonl (ai->request_id); 1928 arm->id = htonl (ai->request_id);
1934 arm->attestation_len = htons (rd->data_size); 1929 arm->attestation_len = htons (rd->data_size);
1935 arm->attributes_len = htons (attrs_size);
1936 GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity); 1930 GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
1937 data_tmp = (char *) &arm[1]; 1931 data_tmp = (char *) &arm[1];
1938 GNUNET_memcpy (data_tmp, rd->data, rd->data_size); 1932 GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
1939 data_tmp += rd->data_size;
1940 GNUNET_RECLAIM_attribute_list_serialize (attrs,
1941 data_tmp);
1942 1933
1943 GNUNET_MQ_send (ai->client->mq, env); 1934 GNUNET_MQ_send (ai->client->mq, env);
1944} 1935}