diff options
Diffstat (limited to 'src/testing/testing_api_cmd_lock_product.c')
-rw-r--r-- | src/testing/testing_api_cmd_lock_product.c | 12 |
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 | |||
57 | /** | 57 | /** |
58 | * UUID that identifies the client holding the lock | 58 | * UUID that identifies the client holding the lock |
59 | */ | 59 | */ |
60 | struct GNUNET_Uuid uuid; | 60 | char *uuid; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * duration how long should the lock be held | 63 | * duration how long should the lock be held |
@@ -138,7 +138,7 @@ lock_product_run (void *cls, | |||
138 | pis->iph = TALER_MERCHANT_product_lock (is->ctx, | 138 | pis->iph = TALER_MERCHANT_product_lock (is->ctx, |
139 | pis->merchant_url, | 139 | pis->merchant_url, |
140 | pis->product_id, | 140 | pis->product_id, |
141 | &pis->uuid, | 141 | pis->uuid, |
142 | pis->duration, | 142 | pis->duration, |
143 | pis->quantity, | 143 | pis->quantity, |
144 | &lock_product_cb, | 144 | &lock_product_cb, |
@@ -166,6 +166,7 @@ lock_product_cleanup (void *cls, | |||
166 | "POST /product/$ID/lock operation did not complete\n"); | 166 | "POST /product/$ID/lock operation did not complete\n"); |
167 | TALER_MERCHANT_product_lock_cancel (pis->iph); | 167 | TALER_MERCHANT_product_lock_cancel (pis->iph); |
168 | } | 168 | } |
169 | GNUNET_free (pis->uuid); | ||
169 | GNUNET_free (pis); | 170 | GNUNET_free (pis); |
170 | } | 171 | } |
171 | 172 | ||
@@ -188,7 +189,7 @@ lock_product_traits (void *cls, | |||
188 | struct LockProductState *lps = cls; | 189 | struct LockProductState *lps = cls; |
189 | 190 | ||
190 | struct TALER_TESTING_Trait traits[] = { | 191 | struct TALER_TESTING_Trait traits[] = { |
191 | TALER_TESTING_make_trait_uuid (0, &lps->uuid), | 192 | TALER_TESTING_make_trait_string (0, lps->uuid), |
192 | TALER_TESTING_trait_end () | 193 | TALER_TESTING_trait_end () |
193 | }; | 194 | }; |
194 | 195 | ||
@@ -209,14 +210,17 @@ TALER_TESTING_cmd_merchant_lock_product ( | |||
209 | unsigned int http_status) | 210 | unsigned int http_status) |
210 | { | 211 | { |
211 | struct LockProductState *pis; | 212 | struct LockProductState *pis; |
213 | struct GNUNET_Uuid uuid; | ||
212 | 214 | ||
213 | pis = GNUNET_new (struct LockProductState); | 215 | pis = GNUNET_new (struct LockProductState); |
214 | pis->merchant_url = merchant_url; | 216 | pis->merchant_url = merchant_url; |
215 | pis->product_id = product_id; | 217 | pis->product_id = product_id; |
216 | pis->http_status = http_status; | 218 | pis->http_status = http_status; |
217 | GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, | 219 | GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, |
218 | &pis->uuid, | 220 | &uuid, |
219 | sizeof (struct GNUNET_Uuid)); | 221 | sizeof (struct GNUNET_Uuid)); |
222 | pis->uuid = GNUNET_STRINGS_data_to_string_alloc (&uuid, | ||
223 | sizeof (uuid)); | ||
220 | pis->duration = duration; | 224 | pis->duration = duration; |
221 | pis->quantity = quantity; | 225 | pis->quantity = quantity; |
222 | 226 | ||