aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-14 18:45:38 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-14 18:45:38 +0200
commit77494b746ad3baa510ddf751c046b0fa802bfd5f (patch)
treedb49f0f92d2d82caf00defdc872eb190bb3e4076 /src/reclaim/gnunet-service-reclaim.c
parentd969447fbb31a42fd0dda4d15356fb2692a0fc1a (diff)
downloadgnunet-77494b746ad3baa510ddf751c046b0fa802bfd5f.tar.gz
gnunet-77494b746ad3baa510ddf751c046b0fa802bfd5f.zip
RECLAIM/REST: Fix attribute update/rest store
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c
index a49962b4d..0f0de86d3 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -778,9 +778,10 @@ attr_store_task (void *cls)
778 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Storing attribute\n"); 778 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Storing attribute\n");
779 buf_size = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (ash->claim); 779 buf_size = GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (ash->claim);
780 buf = GNUNET_malloc (buf_size); 780 buf = GNUNET_malloc (buf_size);
781 // Give the ash a new id 781 // Give the ash a new id if unset
782 ash->claim->id = 782 if (0 == ash->claim->id)
783 GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX); 783 ash->claim->id =
784 GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX);
784 GNUNET_RECLAIM_ATTRIBUTE_serialize (ash->claim, buf); 785 GNUNET_RECLAIM_ATTRIBUTE_serialize (ash->claim, buf);
785 label = 786 label =
786 GNUNET_STRINGS_data_to_string_alloc (&ash->claim->id, sizeof (uint64_t)); 787 GNUNET_STRINGS_data_to_string_alloc (&ash->claim->id, sizeof (uint64_t));