From 1408842544b1cbea01efc636bdcb6be73a4e20a9 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Wed, 1 Dec 2021 14:06:12 +0100 Subject: - using the big macrofication of the traits from GNU Taler now --- .../testing_api_cmd_block_until_external_trigger.c | 48 +--------------------- 1 file changed, 2 insertions(+), 46 deletions(-) (limited to 'src/testing/testing_api_cmd_block_until_external_trigger.c') diff --git a/src/testing/testing_api_cmd_block_until_external_trigger.c b/src/testing/testing_api_cmd_block_until_external_trigger.c index 9360dd02e..f51b2109b 100644 --- a/src/testing/testing_api_cmd_block_until_external_trigger.c +++ b/src/testing/testing_api_cmd_block_until_external_trigger.c @@ -55,16 +55,8 @@ block_until_external_trigger_traits (void *cls, struct BlockState *bs = cls; struct GNUNET_TESTING_AsyncContext *ac = &bs->ac; struct GNUNET_TESTING_Trait traits[] = { - { - .index = 0, - .trait_name = "async_context", - .ptr = (const void *) ac, - }, - { - .index = 1, - .trait_name = "block_state", - .ptr = (const void *) bs, - }, + GNUNET_TESTING_make_trait_async_context ((const void *) ac), + GNUNET_TESTING_make_trait_block_state ((const void *) bs), GNUNET_TESTING_trait_end () }; @@ -75,42 +67,6 @@ block_until_external_trigger_traits (void *cls, } -/** - * Function to get the trait with the internal command state BlockState. - * - * * @param[out] ac struct BlockState. -* @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. - */ -int -GNUNET_TESTING_get_trait_block_state ( - const struct GNUNET_TESTING_Command *cmd, - struct BlockState **bs) -{ - return cmd->traits (cmd->cls, - (const void **) bs, - "block_state", - (unsigned int) 1); -} - - -/** - * Function to get the trait with the async context. - * - * @param[out] ac struct GNUNET_TESTING_AsyncContext. - * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. - */ -int -GNUNET_TESTING_get_trait_async_context ( - const struct GNUNET_TESTING_Command *cmd, - struct GNUNET_TESTING_AsyncContext **ac) -{ - return cmd->traits (cmd->cls, - (const void **) ac, - "async_context", - (unsigned int) 0); -} - - /** * This function does nothing but to start the cmd. * -- cgit v1.2.3