summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_lock_product.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_lock_product.c')
-rw-r--r--src/testing/testing_api_cmd_lock_product.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/testing/testing_api_cmd_lock_product.c b/src/testing/testing_api_cmd_lock_product.c
index abb5920c..49f815d6 100644
--- a/src/testing/testing_api_cmd_lock_product.c
+++ b/src/testing/testing_api_cmd_lock_product.c
@@ -57,7 +57,7 @@ struct LockProductState
/**
* UUID that identifies the client holding the lock
*/
- struct GNUNET_Uuid uuid;
+ char *uuid;
/**
* duration how long should the lock be held
@@ -138,7 +138,7 @@ lock_product_run (void *cls,
pis->iph = TALER_MERCHANT_product_lock (is->ctx,
pis->merchant_url,
pis->product_id,
- &pis->uuid,
+ pis->uuid,
pis->duration,
pis->quantity,
&lock_product_cb,
@@ -166,6 +166,7 @@ lock_product_cleanup (void *cls,
"POST /product/$ID/lock operation did not complete\n");
TALER_MERCHANT_product_lock_cancel (pis->iph);
}
+ GNUNET_free (pis->uuid);
GNUNET_free (pis);
}
@@ -188,7 +189,7 @@ lock_product_traits (void *cls,
struct LockProductState *lps = cls;
struct TALER_TESTING_Trait traits[] = {
- TALER_TESTING_make_trait_uuid (0, &lps->uuid),
+ TALER_TESTING_make_trait_string (0, lps->uuid),
TALER_TESTING_trait_end ()
};
@@ -209,14 +210,17 @@ TALER_TESTING_cmd_merchant_lock_product (
unsigned int http_status)
{
struct LockProductState *pis;
+ struct GNUNET_Uuid uuid;
pis = GNUNET_new (struct LockProductState);
pis->merchant_url = merchant_url;
pis->product_id = product_id;
pis->http_status = http_status;
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
- &pis->uuid,
+ &uuid,
sizeof (struct GNUNET_Uuid));
+ pis->uuid = GNUNET_STRINGS_data_to_string_alloc (&uuid,
+ sizeof (uuid));
pis->duration = duration;
pis->quantity = quantity;