aboutsummaryrefslogtreecommitdiff
path: root/src/auditor-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-17 17:19:02 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-17 17:19:02 +0100
commite42f014cffae126a52c92fbf8151e6f5cecc9de0 (patch)
treed4d7754aec574bb35a830db30d690df592a224b1 /src/auditor-lib
parentcf1ce4786356cba7d3f84a74fab282650f612db9 (diff)
downloadexchange-e42f014cffae126a52c92fbf8151e6f5cecc9de0.tar.xz
use more const in taler_testing_lib.h
Diffstat (limited to 'src/auditor-lib')
-rw-r--r--src/auditor-lib/testing_auditor_api_cmd_deposit_confirmation.c25
-rw-r--r--src/auditor-lib/testing_auditor_api_cmd_exec_auditor.c3
-rw-r--r--src/auditor-lib/testing_auditor_api_cmd_exec_wire_auditor.c3
3 files changed, 26 insertions, 5 deletions
diff --git a/src/auditor-lib/testing_auditor_api_cmd_deposit_confirmation.c b/src/auditor-lib/testing_auditor_api_cmd_deposit_confirmation.c
index 3ee8b14aa..015914210 100644
--- a/src/auditor-lib/testing_auditor_api_cmd_deposit_confirmation.c
+++ b/src/auditor-lib/testing_auditor_api_cmd_deposit_confirmation.c
@@ -311,6 +311,28 @@ deposit_confirmation_cleanup (void *cls,
/**
+ * Offer internal data to other commands.
+ *
+ * @param cls closure.
+ * @param ret[out] set to the wanted data.
+ * @param trait name of the trait.
+ * @param index index number of the traits to be returned.
+ *
+ * @return #GNUNET_OK on success
+ */
+static int
+deposit_confirmation_traits (void *cls,
+ const void **ret,
+ const char *trait,
+ unsigned int index)
+{
+ /* Must define this function because some callbacks
+ * look for certain traits on _all_ the commands. */
+ return GNUNET_SYSERR;
+}
+
+
+/**
* Create a "deposit-confirmation" command.
*
* @param label command label.
@@ -346,7 +368,8 @@ TALER_TESTING_cmd_deposit_confirmation
cmd.label = label;
cmd.run = &deposit_confirmation_run;
cmd.cleanup = &deposit_confirmation_cleanup;
-
+ cmd.traits = &deposit_confirmation_traits;
+
return cmd;
}
diff --git a/src/auditor-lib/testing_auditor_api_cmd_exec_auditor.c b/src/auditor-lib/testing_auditor_api_cmd_exec_auditor.c
index 273612497..afe9d38fc 100644
--- a/src/auditor-lib/testing_auditor_api_cmd_exec_auditor.c
+++ b/src/auditor-lib/testing_auditor_api_cmd_exec_auditor.c
@@ -114,12 +114,11 @@ auditor_cleanup (void *cls,
* @param ret[out] result
* @param trait name of the trait.
* @param index index number of the object to offer.
- *
* @return #GNUNET_OK on success.
*/
static int
auditor_traits (void *cls,
- void **ret,
+ const void **ret,
const char *trait,
unsigned int index)
{
diff --git a/src/auditor-lib/testing_auditor_api_cmd_exec_wire_auditor.c b/src/auditor-lib/testing_auditor_api_cmd_exec_wire_auditor.c
index c32130397..8371f9690 100644
--- a/src/auditor-lib/testing_auditor_api_cmd_exec_wire_auditor.c
+++ b/src/auditor-lib/testing_auditor_api_cmd_exec_wire_auditor.c
@@ -114,12 +114,11 @@ wire_auditor_cleanup (void *cls,
* @param ret[out] result
* @param trait name of the trait.
* @param index index number of the object to offer.
- *
* @return #GNUNET_OK on success.
*/
static int
wire_auditor_traits (void *cls,
- void **ret,
+ const void **ret,
const char *trait,
unsigned int index)
{