REST/NAMESTORE: rework API
[oweals/gnunet.git] / src / reclaim / plugin_rest_reclaim.c
index 74071d97bcbb0817f37858b737b4dcbf690dc029..1a3784e64c67d00f0d655371f89476c32501818d 100644 (file)
@@ -539,8 +539,9 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle,
   /**
    * New ID for attribute
    */
-  attribute->id =
-      GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX);
+  if (0 == attribute->id)
+    attribute->id =
+        GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX);
   handle->idp = GNUNET_RECLAIM_connect (cfg);
   exp = GNUNET_TIME_UNIT_HOURS;
   handle->idp_op = GNUNET_RECLAIM_attribute_store (