summaryrefslogtreecommitdiff
path: root/src/lib/testing_api_cmd_proposal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/testing_api_cmd_proposal.c')
-rw-r--r--src/lib/testing_api_cmd_proposal.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/testing_api_cmd_proposal.c b/src/lib/testing_api_cmd_proposal.c
index 3c6c439c..f42dfa84 100644
--- a/src/lib/testing_api_cmd_proposal.c
+++ b/src/lib/testing_api_cmd_proposal.c
@@ -262,6 +262,17 @@ proposal_cb (void *cls,
struct ProposalState *ps = cls;
ps->po = NULL;
+
+ if (ps->http_status != http_status)
+ TALER_TESTING_FAIL (ps->is);
+
+ if (0 == ps->http_status)
+ {
+ TALER_LOG_DEBUG ("/proposal, expected 0 status code\n");
+ TALER_TESTING_interpreter_next (ps->is);
+ return;
+ }
+
switch (http_status)
{
case MHD_HTTP_OK:
@@ -386,8 +397,8 @@ proposal_cleanup (void *cls,
ps->plo = NULL;
}
- GNUNET_free ((void *) ps->order_id);
- GNUNET_free ((void *) ps->contract_terms);
+ GNUNET_free_non_null ((void *) ps->order_id);
+ GNUNET_free_non_null ((void *) ps->contract_terms);
GNUNET_free (ps);
}