summaryrefslogtreecommitdiff
path: root/src/testing/testing_cmd_challenge_answer.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-21 23:46:23 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-21 23:46:23 +0100
commit141015969be5bcdcd231cfa639250a537456255e (patch)
tree55b6d6fa87dfece9c826ec1608414083c32f849b /src/testing/testing_cmd_challenge_answer.c
parent8e1adab1d9d32fbd4a6519e809b84b9f2518dfc9 (diff)
downloadanastasis-141015969be5bcdcd231cfa639250a537456255e.tar.gz
anastasis-141015969be5bcdcd231cfa639250a537456255e.tar.bz2
anastasis-141015969be5bcdcd231cfa639250a537456255e.zip
-bugfixes
Diffstat (limited to 'src/testing/testing_cmd_challenge_answer.c')
-rw-r--r--src/testing/testing_cmd_challenge_answer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testing/testing_cmd_challenge_answer.c b/src/testing/testing_cmd_challenge_answer.c
index ec8d03d..c9cb976 100644
--- a/src/testing/testing_cmd_challenge_answer.c
+++ b/src/testing/testing_cmd_challenge_answer.c
@@ -91,7 +91,7 @@ struct ChallengeState
/**
* code we read in the file generated by the plugin
*/
- char code[22];
+ char *code;
};
@@ -166,6 +166,7 @@ challenge_answer_cb (void *af_cls,
TALER_TESTING_interpreter_fail (cs->is);
return;
}
+ cs->code = GNUNET_malloc (22);
if (0 == fscanf (file,
"%21s",
cs->code))
@@ -480,6 +481,7 @@ challenge_cleanup (void *cls,
}
GNUNET_free (cs->payment_uri);
GNUNET_free (cs->order_id);
+ GNUNET_free (cs->code);
GNUNET_free (cs);
}
@@ -493,7 +495,7 @@ challenge_cleanup (void *cls,
* @param index index number of the object to extract.
* @return #GNUNET_OK on success
*/
-static int
+static enum GNUNET_GenericReturnValue
challenge_create_traits (void *cls,
const void **ret,
const char *trait,
@@ -502,7 +504,7 @@ challenge_create_traits (void *cls,
struct ChallengeState *cs = cls;
struct TALER_TESTING_Trait traits[] = {
ANASTASIS_TESTING_make_trait_code (
- (const char **) cs->code),
+ (const char **) &cs->code),
ANASTASIS_TESTING_make_trait_payment_secret (
&cs->payment_order_req),
TALER_TESTING_make_trait_payto_uri (