fix ftbfs

This commit is contained in:
Christian Grothoff 2020-01-12 18:14:16 +01:00
parent c7610bf617
commit 6a4cc07978
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 28 additions and 45 deletions

View File

@ -129,7 +129,8 @@ struct Transaction
uint64_t row_id; uint64_t row_id;
/** /**
* Has this transaction been subjected to #TALER_FAKEBANK_check() * Has this transaction been subjected to #TALER_FAKEBANK_check_credit()
* or #TALER_FAKEBANK_check_debit()
* and should thus no longer be counted in * and should thus no longer be counted in
* #TALER_FAKEBANK_check_empty()? * #TALER_FAKEBANK_check_empty()?
*/ */

View File

@ -28,7 +28,6 @@
#include "taler_json_lib.h" #include "taler_json_lib.h"
#include "taler_wire_lib.h" #include "taler_wire_lib.h"
#include "taler_signatures.h" #include "taler_signatures.h"
#include "taler_wire_plugin.h"
#include "exchange_api_handle.h" #include "exchange_api_handle.h"
#include "exchange_api_curl_defaults.h" #include "exchange_api_curl_defaults.h"

View File

@ -59,11 +59,6 @@ struct BankCheckState
*/ */
const char *credit_account; const char *credit_account;
/**
* Wire transfer subject (set by fakebank-lib).
*/
char *subject;
/** /**
* Binary form of the wire transfer subject. * Binary form of the wire transfer subject.
*/ */
@ -155,12 +150,12 @@ check_bank_transfer_run (void *cls,
} }
if (GNUNET_OK != if (GNUNET_OK !=
TALER_FAKEBANK_check (is->fakebank, TALER_FAKEBANK_check_debit (is->fakebank,
&amount, &amount,
debit_account, debit_account,
credit_account, credit_account,
exchange_base_url, exchange_base_url,
&bcs->subject)) &bcs->wtid))
{ {
GNUNET_break (0); GNUNET_break (0);
TALER_TESTING_interpreter_fail (is); TALER_TESTING_interpreter_fail (is);
@ -183,7 +178,6 @@ check_bank_transfer_cleanup
{ {
struct BankCheckState *bcs = cls; struct BankCheckState *bcs = cls;
GNUNET_free_non_null (bcs->subject);
GNUNET_free (bcs); GNUNET_free (bcs);
} }
@ -204,17 +198,7 @@ check_bank_transfer_traits (void *cls,
unsigned int index) unsigned int index)
{ {
struct BankCheckState *bcs = cls; struct BankCheckState *bcs = cls;
struct TALER_WireTransferIdentifierRawP *wtid_ptr; struct TALER_WireTransferIdentifierRawP *wtid_ptr = &bcs->wtid;
if (GNUNET_OK != GNUNET_STRINGS_string_to_data
(bcs->subject,
strlen (bcs->subject),
&bcs->wtid,
sizeof (struct TALER_WireTransferIdentifierRawP)))
wtid_ptr = NULL;
else
wtid_ptr = &bcs->wtid;
{
struct TALER_TESTING_Trait traits[] = { struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_wtid (0, wtid_ptr), TALER_TESTING_make_trait_wtid (0, wtid_ptr),
TALER_TESTING_make_trait_url (0, bcs->exchange_base_url), TALER_TESTING_make_trait_url (0, bcs->exchange_base_url),
@ -225,7 +209,6 @@ check_bank_transfer_traits (void *cls,
ret, ret,
trait, trait,
index); index);
}
} }
@ -335,7 +318,6 @@ check_bank_empty_traits (void *cls,
struct TALER_TESTING_Command struct TALER_TESTING_Command
TALER_TESTING_cmd_check_bank_empty (const char *label) TALER_TESTING_cmd_check_bank_empty (const char *label)
{ {
struct TALER_TESTING_Command cmd = { struct TALER_TESTING_Command cmd = {
.label = label, .label = label,
.run = &check_bank_empty_run, .run = &check_bank_empty_run,
@ -368,7 +350,7 @@ TALER_TESTING_cmd_check_bank_transfer_with_ref
bcs = GNUNET_new (struct BankCheckState); bcs = GNUNET_new (struct BankCheckState);
bcs->deposit_reference = deposit_reference; bcs->deposit_reference = deposit_reference;
{
struct TALER_TESTING_Command cmd = { struct TALER_TESTING_Command cmd = {
.label = label, .label = label,
.cls = bcs, .cls = bcs,
@ -378,4 +360,5 @@ TALER_TESTING_cmd_check_bank_transfer_with_ref
}; };
return cmd; return cmd;
}
} }