summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_reserve_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_reserve_get.c')
-rw-r--r--src/testing/testing_api_cmd_reserve_get.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/testing/testing_api_cmd_reserve_get.c b/src/testing/testing_api_cmd_reserve_get.c
index f9b8ff6cd..9a938cf82 100644
--- a/src/testing/testing_api_cmd_reserve_get.c
+++ b/src/testing/testing_api_cmd_reserve_get.c
@@ -178,18 +178,19 @@ status_run (void *cls,
{
struct StatusState *ss = cls;
const struct TALER_TESTING_Command *create_reserve;
+ const char *exchange_url;
ss->is = is;
- create_reserve
- = TALER_TESTING_interpreter_lookup_command (is,
- ss->reserve_reference);
-
- if (NULL == create_reserve)
+ exchange_url = TALER_TESTING_get_exchange_url (is);
+ if (NULL == exchange_url)
{
GNUNET_break (0);
- TALER_TESTING_interpreter_fail (is);
return;
}
+ create_reserve
+ = TALER_TESTING_interpreter_lookup_command (is,
+ ss->reserve_reference);
+ GNUNET_assert (NULL != create_reserve);
if (GNUNET_OK !=
TALER_TESTING_get_trait_reserve_pub (create_reserve,
&ss->reserve_pubp))
@@ -199,11 +200,13 @@ status_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
- ss->rsh = TALER_EXCHANGE_reserves_get (is->exchange,
- ss->reserve_pubp,
- ss->timeout,
- &reserve_status_cb,
- ss);
+ ss->rsh = TALER_EXCHANGE_reserves_get (
+ TALER_TESTING_interpreter_get_context (is),
+ exchange_url,
+ ss->reserve_pubp,
+ ss->timeout,
+ &reserve_status_cb,
+ ss);
if (! GNUNET_TIME_relative_is_zero (ss->timeout))
{
TALER_TESTING_interpreter_next (is);
@@ -227,10 +230,8 @@ status_cleanup (void *cls,
if (NULL != ss->rsh)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Command %u (%s) did not complete\n",
- ss->is->ip,
- cmd->label);
+ TALER_TESTING_command_incomplete (ss->is,
+ cmd->label);
TALER_EXCHANGE_reserves_get_cancel (ss->rsh);
ss->rsh = NULL;
}
@@ -328,6 +329,7 @@ finish_run (void *cls,
poll_reserve
= TALER_TESTING_interpreter_lookup_command (is,
ps->poll_reference);
+ GNUNET_assert (NULL != poll_reserve);
GNUNET_assert (poll_reserve->run == &status_run);
ss = poll_reserve->cls;
if (NULL == ss->rsh)