aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bank-lib/testing_api_cmd_history.c13
-rw-r--r--src/bank-lib/testing_api_cmd_reject.c14
-rw-r--r--src/exchange-lib/testing_api_cmd_bank_check.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_batch.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_check_keys.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_deposit.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_exec_aggregator.c15
-rw-r--r--src/exchange-lib/testing_api_cmd_exec_auditor-sign.c16
-rw-r--r--src/exchange-lib/testing_api_cmd_exec_keyup.c15
-rw-r--r--src/exchange-lib/testing_api_cmd_exec_wirewatch.c16
-rw-r--r--src/exchange-lib/testing_api_cmd_fakebank_transfer.c60
-rw-r--r--src/exchange-lib/testing_api_cmd_payback.c24
-rw-r--r--src/exchange-lib/testing_api_cmd_refresh.c54
-rw-r--r--src/exchange-lib/testing_api_cmd_refund.c22
-rw-r--r--src/exchange-lib/testing_api_cmd_signal.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_sleep.c13
-rw-r--r--src/exchange-lib/testing_api_cmd_status.c11
-rw-r--r--src/exchange-lib/testing_api_cmd_track.c35
-rw-r--r--src/exchange-lib/testing_api_cmd_wire.c11
-rw-r--r--src/exchange-lib/testing_api_cmd_withdraw.c28
20 files changed, 237 insertions, 175 deletions
diff --git a/src/bank-lib/testing_api_cmd_history.c b/src/bank-lib/testing_api_cmd_history.c
index c60f6a13d..6070d0ae3 100644
--- a/src/bank-lib/testing_api_cmd_history.c
+++ b/src/bank-lib/testing_api_cmd_history.c
@@ -793,7 +793,6 @@ TALER_TESTING_cmd_bank_history
long long num_results)
{
struct HistoryState *hs;
- struct TALER_TESTING_Command cmd;
hs = GNUNET_new (struct HistoryState);
hs->bank_url = bank_url;
@@ -803,11 +802,13 @@ TALER_TESTING_cmd_bank_history
hs->num_results = num_results;
hs->ascending = ascending;
- cmd.label = label;
- cmd.cls = hs;
- cmd.run = &history_run;
- cmd.cleanup = &history_cleanup;
- cmd.traits = &history_traits;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = hs,
+ .run = &history_run,
+ .cleanup = &history_cleanup,
+ .traits = &history_traits
+ };
return cmd;
}
diff --git a/src/bank-lib/testing_api_cmd_reject.c b/src/bank-lib/testing_api_cmd_reject.c
index 2bec10ad7..46d67ff21 100644
--- a/src/bank-lib/testing_api_cmd_reject.c
+++ b/src/bank-lib/testing_api_cmd_reject.c
@@ -200,20 +200,22 @@ TALER_TESTING_cmd_bank_reject (const char *label,
const char *deposit_reference)
{
struct RejectState *rs;
- struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RejectState);
rs->bank_url = bank_url;
rs->deposit_reference = deposit_reference;
- cmd.cls = rs;
- cmd.run = &reject_run;
- cmd.cleanup = &reject_cleanup;
- cmd.label = label;
- cmd.traits = &reject_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rs,
+ .run = &reject_run,
+ .cleanup = &reject_cleanup,
+ .label = label,
+ .traits = &reject_traits
+ };
return cmd;
}
+
/* end of testing_api_cmd_reject.c */
diff --git a/src/exchange-lib/testing_api_cmd_bank_check.c b/src/exchange-lib/testing_api_cmd_bank_check.c
index 70d836a3b..265cba176 100644
--- a/src/exchange-lib/testing_api_cmd_bank_check.c
+++ b/src/exchange-lib/testing_api_cmd_bank_check.c
@@ -253,7 +253,6 @@ TALER_TESTING_cmd_check_bank_transfer
uint64_t credit_account)
{
struct BankCheckState *bcs;
- struct TALER_TESTING_Command cmd;
bcs = GNUNET_new (struct BankCheckState);
bcs->exchange_base_url = exchange_base_url;
@@ -263,11 +262,13 @@ TALER_TESTING_cmd_check_bank_transfer
bcs->deposit_reference = NULL;
- cmd.label = label;
- cmd.cls = bcs;
- cmd.run = &check_bank_transfer_run;
- cmd.cleanup = &check_bank_transfer_cleanup;
- cmd.traits = &check_bank_transfer_traits;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = bcs,
+ .run = &check_bank_transfer_run,
+ .cleanup = &check_bank_transfer_cleanup,
+ .traits = &check_bank_transfer_traits
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_batch.c b/src/exchange-lib/testing_api_cmd_batch.c
index f9e452dd5..dadfae408 100644
--- a/src/exchange-lib/testing_api_cmd_batch.c
+++ b/src/exchange-lib/testing_api_cmd_batch.c
@@ -157,7 +157,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_batch (const char *label,
struct TALER_TESTING_Command *batch)
{
- struct TALER_TESTING_Command cmd;
struct BatchState *bs;
unsigned int i;
@@ -175,11 +174,13 @@ TALER_TESTING_cmd_batch (const char *label,
batch,
sizeof (struct TALER_TESTING_Command) * i);
- cmd.cls = bs;
- cmd.label = label;
- cmd.run = &batch_run;
- cmd.cleanup = &batch_cleanup;
- cmd.traits = &batch_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = bs,
+ .label = label,
+ .run = &batch_run,
+ .cleanup = &batch_cleanup,
+ .traits = &batch_traits
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_check_keys.c b/src/exchange-lib/testing_api_cmd_check_keys.c
index ede432856..1f559ed56 100644
--- a/src/exchange-lib/testing_api_cmd_check_keys.c
+++ b/src/exchange-lib/testing_api_cmd_check_keys.c
@@ -143,15 +143,18 @@ TALER_TESTING_cmd_check_keys
unsigned int num_denom_keys)
{
struct CheckKeysState *cks;
- struct TALER_TESTING_Command cmd;
cks = GNUNET_new (struct CheckKeysState);
cks->generation = generation;
cks->num_denom_keys = num_denom_keys;
- cmd.cls = cks;
- cmd.label = label;
- cmd.run = &check_keys_run;
- cmd.cleanup = &check_keys_cleanup;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = cks,
+ .label = label,
+ .run = &check_keys_run,
+ .cleanup = &check_keys_cleanup
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_deposit.c b/src/exchange-lib/testing_api_cmd_deposit.c
index d0cfd62da..6fa2310d3 100644
--- a/src/exchange-lib/testing_api_cmd_deposit.c
+++ b/src/exchange-lib/testing_api_cmd_deposit.c
@@ -519,7 +519,6 @@ TALER_TESTING_cmd_deposit
const char *amount,
unsigned int expected_response_code)
{
- struct TALER_TESTING_Command cmd = {0}; /* need explicit zeroing..*/
struct DepositState *ds;
ds = GNUNET_new (struct DepositState);
@@ -543,11 +542,13 @@ TALER_TESTING_cmd_deposit
ds->amount = amount;
ds->expected_response_code = expected_response_code;
- cmd.cls = ds;
- cmd.label = label;
- cmd.run = &deposit_run;
- cmd.cleanup = &deposit_cleanup;
- cmd.traits = &deposit_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ds,
+ .label = label,
+ .run = &deposit_run,
+ .cleanup = &deposit_cleanup,
+ .traits = &deposit_traits
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_exec_aggregator.c b/src/exchange-lib/testing_api_cmd_exec_aggregator.c
index a93f6deba..c51d44989 100644
--- a/src/exchange-lib/testing_api_cmd_exec_aggregator.c
+++ b/src/exchange-lib/testing_api_cmd_exec_aggregator.c
@@ -147,16 +147,19 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_aggregator (const char *label,
const char *config_filename)
{
- struct TALER_TESTING_Command cmd;
struct AggregatorState *as;
as = GNUNET_new (struct AggregatorState);
as->config_filename = config_filename;
- cmd.cls = as;
- cmd.label = label;
- cmd.run = &aggregator_run;
- cmd.cleanup = &aggregator_cleanup;
- cmd.traits = &aggregator_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = as,
+ .label = label,
+ .run = &aggregator_run,
+ .cleanup = &aggregator_cleanup,
+ .traits = &aggregator_traits
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
index 79f0a0a13..90a1654ce 100644
--- a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
+++ b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
@@ -212,16 +212,20 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor_sign (const char *label,
const char *config_filename)
{
- struct TALER_TESTING_Command cmd;
struct AuditorSignState *ass;
ass = GNUNET_new (struct AuditorSignState);
ass->config_filename = config_filename;
- cmd.cls = ass;
- cmd.label = label;
- cmd.run = &auditor_sign_run;
- cmd.cleanup = &auditor_sign_cleanup;
- cmd.traits = &auditor_sign_traits;
+
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = ass,
+ .label = label,
+ .run = &auditor_sign_run,
+ .cleanup = &auditor_sign_cleanup,
+ .traits = &auditor_sign_traits
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_exec_keyup.c b/src/exchange-lib/testing_api_cmd_exec_keyup.c
index be08bacda..576aab3c7 100644
--- a/src/exchange-lib/testing_api_cmd_exec_keyup.c
+++ b/src/exchange-lib/testing_api_cmd_exec_keyup.c
@@ -150,16 +150,19 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_keyup (const char *label,
const char *config_filename)
{
- struct TALER_TESTING_Command cmd;
struct KeyupState *ks;
ks = GNUNET_new (struct KeyupState);
ks->config_filename = config_filename;
- cmd.cls = ks;
- cmd.label = label;
- cmd.run = &keyup_run;
- cmd.cleanup = &keyup_cleanup;
- cmd.traits = &keyup_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = ks,
+ .label = label,
+ .run = &keyup_run,
+ .cleanup = &keyup_cleanup,
+ .traits = &keyup_traits
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_exec_wirewatch.c b/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
index c94be2d48..a81bf5c2b 100644
--- a/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
+++ b/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
@@ -148,16 +148,20 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_wirewatch (const char *label,
const char *config_filename)
{
- struct TALER_TESTING_Command cmd;
struct WirewatchState *ws;
ws = GNUNET_new (struct WirewatchState);
ws->config_filename = config_filename;
- cmd.cls = ws;
- cmd.label = label;
- cmd.run = &wirewatch_run;
- cmd.cleanup = &wirewatch_cleanup;
- cmd.traits = &wirewatch_traits;
+
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = ws,
+ .label = label,
+ .run = &wirewatch_run,
+ .cleanup = &wirewatch_cleanup,
+ .traits = &wirewatch_traits
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
index 17d1319eb..43f72573b 100644
--- a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
+++ b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
@@ -486,7 +486,6 @@ TALER_TESTING_cmd_fakebank_transfer
const char *auth_password,
const char *exchange_url)
{
- struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState);
@@ -506,11 +505,15 @@ TALER_TESTING_cmd_fakebank_transfer
label);
GNUNET_assert (0);
}
- cmd.cls = fts;
- cmd.label = label;
- cmd.run = &fakebank_transfer_run;
- cmd.cleanup = &fakebank_transfer_cleanup;
- cmd.traits = &fakebank_transfer_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = fts,
+ .label = label,
+ .run = &fakebank_transfer_run,
+ .cleanup = &fakebank_transfer_cleanup,
+ .traits = &fakebank_transfer_traits
+ };
+
return cmd;
}
@@ -549,7 +552,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
const char *subject,
const char *exchange_url)
{
- struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState);
@@ -575,11 +577,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject
label);
GNUNET_assert (0);
}
- cmd.cls = fts;
- cmd.label = label;
- cmd.run = &fakebank_transfer_run;
- cmd.cleanup = &fakebank_transfer_cleanup;
- cmd.traits = &fakebank_transfer_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = fts,
+ .label = label,
+ .run = &fakebank_transfer_run,
+ .cleanup = &fakebank_transfer_cleanup,
+ .traits = &fakebank_transfer_traits
+ };
+
return cmd;
}
@@ -619,7 +625,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref
const char *ref,
const char *exchange_url)
{
- struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState);
@@ -640,11 +645,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref
label);
GNUNET_assert (0);
}
- cmd.cls = fts;
- cmd.label = label;
- cmd.run = &fakebank_transfer_run;
- cmd.cleanup = &fakebank_transfer_cleanup;
- cmd.traits = &fakebank_transfer_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = fts,
+ .label = label,
+ .run = &fakebank_transfer_run,
+ .cleanup = &fakebank_transfer_cleanup,
+ .traits = &fakebank_transfer_traits
+ };
+
return cmd;
}
@@ -691,7 +700,6 @@ TALER_TESTING_cmd_fakebank_transfer_with_instance
const char *exchange_url,
const char *config_filename)
{
- struct TALER_TESTING_Command cmd;
struct FakebankTransferState *fts;
fts = GNUNET_new (struct FakebankTransferState);
@@ -713,11 +721,15 @@ TALER_TESTING_cmd_fakebank_transfer_with_instance
label);
GNUNET_assert (0);
}
- cmd.cls = fts;
- cmd.label = label;
- cmd.run = &fakebank_transfer_run;
- cmd.cleanup = &fakebank_transfer_cleanup;
- cmd.traits = &fakebank_transfer_traits;
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = fts,
+ .label = label,
+ .run = &fakebank_transfer_run,
+ .cleanup = &fakebank_transfer_cleanup,
+ .traits = &fakebank_transfer_traits
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_payback.c b/src/exchange-lib/testing_api_cmd_payback.c
index 28792794a..a4a3aeff1 100644
--- a/src/exchange-lib/testing_api_cmd_payback.c
+++ b/src/exchange-lib/testing_api_cmd_payback.c
@@ -444,17 +444,18 @@ TALER_TESTING_cmd_payback (const char *label,
const char *amount)
{
struct PaybackState *ps;
- struct TALER_TESTING_Command cmd;
ps = GNUNET_new (struct PaybackState);
ps->expected_response_code = expected_response_code;
ps->coin_reference = coin_reference;
ps->amount = amount;
- cmd.cls = ps;
- cmd.label = label;
- cmd.run = &payback_run;
- cmd.cleanup = &payback_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ps,
+ .label = label,
+ .run = &payback_run,
+ .cleanup = &payback_cleanup
+ };
return cmd;
}
@@ -479,18 +480,19 @@ TALER_TESTING_cmd_revoke (const char *label,
{
struct RevokeState *rs;
- struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RevokeState);
rs->expected_response_code = expected_response_code;
rs->coin_reference = coin_reference;
rs->config_filename = config_filename;
- cmd.cls = rs;
- cmd.label = label;
- cmd.run = &revoke_run;
- cmd.cleanup = &revoke_cleanup;
- cmd.traits = &revoke_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rs,
+ .label = label,
+ .run = &revoke_run,
+ .cleanup = &revoke_cleanup,
+ .traits = &revoke_traits
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_refresh.c b/src/exchange-lib/testing_api_cmd_refresh.c
index 7b14ecae8..55900cf27 100644
--- a/src/exchange-lib/testing_api_cmd_refresh.c
+++ b/src/exchange-lib/testing_api_cmd_refresh.c
@@ -1077,7 +1077,6 @@ TALER_TESTING_cmd_refresh_melt
{
struct RefreshMeltState *rms;
struct MeltDetails md;
- struct TALER_TESTING_Command cmd;
md.coin_reference = coin_reference;
md.amount = amount;
@@ -1086,11 +1085,14 @@ TALER_TESTING_cmd_refresh_melt
rms->melted_coin = md;
rms->expected_response_code = expected_response_code;
- cmd.label = label;
- cmd.cls = rms;
- cmd.run = &refresh_melt_run;
- cmd.cleanup = &refresh_melt_cleanup;
- cmd.traits = &refresh_melt_traits;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = rms,
+ .run = &refresh_melt_run,
+ .cleanup = &refresh_melt_cleanup,
+ .traits = &refresh_melt_traits
+ };
+
return cmd;
}
@@ -1118,7 +1120,6 @@ TALER_TESTING_cmd_refresh_melt_double
{
struct RefreshMeltState *rms;
struct MeltDetails md;
- struct TALER_TESTING_Command cmd;
md.coin_reference = coin_reference;
md.amount = amount;
@@ -1128,11 +1129,14 @@ TALER_TESTING_cmd_refresh_melt_double
rms->expected_response_code = expected_response_code;
rms->double_melt = GNUNET_YES;
- cmd.label = label;
- cmd.cls = rms;
- cmd.run = &refresh_melt_run;
- cmd.cleanup = &refresh_melt_cleanup;
- cmd.traits = &refresh_melt_traits;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .cls = rms,
+ .run = &refresh_melt_run,
+ .cleanup = &refresh_melt_cleanup,
+ .traits = &refresh_melt_traits
+ };
+
return cmd;
}
@@ -1228,17 +1232,19 @@ TALER_TESTING_cmd_refresh_reveal
unsigned int expected_response_code)
{
struct RefreshRevealState *rrs;
- struct TALER_TESTING_Command cmd;
rrs = GNUNET_new (struct RefreshRevealState);
rrs->melt_reference = melt_reference;
rrs->expected_response_code = expected_response_code;
- cmd.cls = rrs;
- cmd.label = label;
- cmd.run = &refresh_reveal_run;
- cmd.cleanup = &refresh_reveal_cleanup;
- cmd.traits = &refresh_reveal_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rrs,
+ .label = label,
+ .run = &refresh_reveal_run,
+ .cleanup = &refresh_reveal_cleanup,
+ .traits = &refresh_reveal_traits
+ };
+
return cmd;
}
@@ -1277,16 +1283,18 @@ TALER_TESTING_cmd_refresh_link
unsigned int expected_response_code)
{
struct RefreshLinkState *rrs;
- struct TALER_TESTING_Command cmd;
rrs = GNUNET_new (struct RefreshLinkState);
rrs->reveal_reference = reveal_reference;
rrs->expected_response_code = expected_response_code;
- cmd.cls = rrs;
- cmd.label = label;
- cmd.run = &refresh_link_run;
- cmd.cleanup = &refresh_link_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rrs,
+ .label = label,
+ .run = &refresh_link_run,
+ .cleanup = &refresh_link_cleanup
+ };
+
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_refund.c b/src/exchange-lib/testing_api_cmd_refund.c
index e59116591..f6640d0fc 100644
--- a/src/exchange-lib/testing_api_cmd_refund.c
+++ b/src/exchange-lib/testing_api_cmd_refund.c
@@ -268,7 +268,6 @@ TALER_TESTING_cmd_refund (const char *label,
const char *coin_reference)
{
struct RefundState *rs;
- struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RefundState);
@@ -277,10 +276,12 @@ TALER_TESTING_cmd_refund (const char *label,
rs->refund_fee = refund_fee;
rs->coin_reference = coin_reference;
- cmd.cls = rs;
- cmd.label = label;
- cmd.run = &refund_run;
- cmd.cleanup = &refund_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rs,
+ .label = label,
+ .run = &refund_run,
+ .cleanup = &refund_cleanup
+ };
return cmd;
}
@@ -310,7 +311,6 @@ TALER_TESTING_cmd_refund_with_id
uint64_t refund_transaction_id)
{
struct RefundState *rs;
- struct TALER_TESTING_Command cmd;
rs = GNUNET_new (struct RefundState);
@@ -320,10 +320,12 @@ TALER_TESTING_cmd_refund_with_id
rs->coin_reference = coin_reference;
rs->refund_transaction_id = refund_transaction_id;
- cmd.cls = rs;
- cmd.label = label;
- cmd.run = &refund_run;
- cmd.cleanup = &refund_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = rs,
+ .label = label,
+ .run = &refund_run,
+ .cleanup = &refund_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_signal.c b/src/exchange-lib/testing_api_cmd_signal.c
index b9487cd6f..f4fd8bb76 100644
--- a/src/exchange-lib/testing_api_cmd_signal.c
+++ b/src/exchange-lib/testing_api_cmd_signal.c
@@ -99,15 +99,18 @@ TALER_TESTING_cmd_signal (const char *label,
int signal)
{
struct SignalState *ss;
- struct TALER_TESTING_Command cmd;
ss = GNUNET_new (struct SignalState);
ss->process = process;
ss->signal = signal;
- cmd.cls = ss;
- cmd.label = label;
- cmd.run = &signal_run;
- cmd.cleanup = &signal_cleanup;
+
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = ss,
+ .label = label,
+ .run = &signal_run,
+ .cleanup = &signal_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_sleep.c b/src/exchange-lib/testing_api_cmd_sleep.c
index 91198a28a..165d0aae4 100644
--- a/src/exchange-lib/testing_api_cmd_sleep.c
+++ b/src/exchange-lib/testing_api_cmd_sleep.c
@@ -88,14 +88,17 @@ TALER_TESTING_cmd_sleep (const char *label,
unsigned int duration_s)
{
struct SleepState *ss;
- struct TALER_TESTING_Command cmd;
ss = GNUNET_new (struct SleepState);
ss->duration = duration_s;
- cmd.cls = ss;
- cmd.label = label;
- cmd.run = &sleep_run;
- cmd.cleanup = &sleep_cleanup;
+
+
+ struct TALER_TESTING_Command cmd = {
+ .cls = ss,
+ .label = label,
+ .run = &sleep_run,
+ .cleanup = &sleep_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_status.c b/src/exchange-lib/testing_api_cmd_status.c
index f71fe84de..8e9290f6d 100644
--- a/src/exchange-lib/testing_api_cmd_status.c
+++ b/src/exchange-lib/testing_api_cmd_status.c
@@ -246,7 +246,6 @@ TALER_TESTING_cmd_status (const char *label,
const char *expected_balance,
unsigned int expected_response_code)
{
- struct TALER_TESTING_Command cmd;
struct StatusState *ss;
ss = GNUNET_new (struct StatusState);
@@ -254,10 +253,12 @@ TALER_TESTING_cmd_status (const char *label,
ss->expected_balance = expected_balance;
ss->expected_response_code = expected_response_code;
- cmd.cls = ss;
- cmd.label = label;
- cmd.run = &status_run;
- cmd.cleanup = &status_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ss,
+ .label = label,
+ .run = &status_run,
+ .cleanup = &status_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_track.c b/src/exchange-lib/testing_api_cmd_track.c
index 81d8bdecb..4898a097c 100644
--- a/src/exchange-lib/testing_api_cmd_track.c
+++ b/src/exchange-lib/testing_api_cmd_track.c
@@ -418,7 +418,6 @@ TALER_TESTING_cmd_track_transaction
unsigned int expected_response_code,
const char *bank_transfer_reference)
{
- struct TALER_TESTING_Command cmd;
struct TrackTransactionState *tts;
tts = GNUNET_new (struct TrackTransactionState);
@@ -427,11 +426,13 @@ TALER_TESTING_cmd_track_transaction
tts->bank_transfer_reference = bank_transfer_reference;
tts->coin_index = coin_index;
- cmd.cls = tts;
- cmd.label = label;
- cmd.run = &track_transaction_run;
- cmd.cleanup = &track_transaction_cleanup;
- cmd.traits = &track_transaction_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = tts,
+ .label = label,
+ .run = &track_transaction_run,
+ .cleanup = &track_transaction_cleanup,
+ .traits = &track_transaction_traits
+ };
return cmd;
}
@@ -744,7 +745,6 @@ TALER_TESTING_cmd_track_transfer_empty
unsigned int expected_response_code)
{
struct TrackTransferState *tts;
- struct TALER_TESTING_Command cmd;
tts = GNUNET_new (struct TrackTransferState);
@@ -752,10 +752,12 @@ TALER_TESTING_cmd_track_transfer_empty
tts->index = index;
tts->expected_response_code = expected_response_code;
- cmd.cls = tts;
- cmd.label = label;
- cmd.run = &track_transfer_run;
- cmd.cleanup = &track_transfer_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = tts,
+ .label = label,
+ .run = &track_transfer_run,
+ .cleanup = &track_transfer_cleanup
+ };
return cmd;
}
@@ -786,7 +788,6 @@ TALER_TESTING_cmd_track_transfer
const char *expected_wire_fee)
{
struct TrackTransferState *tts;
- struct TALER_TESTING_Command cmd;
tts = GNUNET_new (struct TrackTransferState);
@@ -796,10 +797,12 @@ TALER_TESTING_cmd_track_transfer
tts->expected_total_amount = expected_total_amount;
tts->expected_wire_fee = expected_wire_fee;
- cmd.cls = tts;
- cmd.label = label;
- cmd.run = &track_transfer_run;
- cmd.cleanup = &track_transfer_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = tts,
+ .label = label,
+ .run = &track_transfer_run,
+ .cleanup = &track_transfer_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_wire.c b/src/exchange-lib/testing_api_cmd_wire.c
index e6fe9f97c..0153af195 100644
--- a/src/exchange-lib/testing_api_cmd_wire.c
+++ b/src/exchange-lib/testing_api_cmd_wire.c
@@ -216,7 +216,6 @@ TALER_TESTING_cmd_wire (const char *label,
const char *expected_fee,
unsigned int expected_response_code)
{
- struct TALER_TESTING_Command cmd;
struct WireState *ws;
ws = GNUNET_new (struct WireState);
@@ -224,10 +223,12 @@ TALER_TESTING_cmd_wire (const char *label,
ws->expected_fee = expected_fee;
ws->expected_response_code = expected_response_code;
- cmd.cls = ws;
- cmd.label = label;
- cmd.run = &wire_run;
- cmd.cleanup = &wire_cleanup;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ws,
+ .label = label,
+ .run = &wire_run,
+ .cleanup = &wire_cleanup
+ };
return cmd;
}
diff --git a/src/exchange-lib/testing_api_cmd_withdraw.c b/src/exchange-lib/testing_api_cmd_withdraw.c
index b42a54585..7224f65e4 100644
--- a/src/exchange-lib/testing_api_cmd_withdraw.c
+++ b/src/exchange-lib/testing_api_cmd_withdraw.c
@@ -412,7 +412,6 @@ TALER_TESTING_cmd_withdraw_amount
const char *amount,
unsigned int expected_response_code)
{
- struct TALER_TESTING_Command cmd;
struct WithdrawState *ws;
ws = GNUNET_new (struct WithdrawState);
@@ -431,11 +430,14 @@ TALER_TESTING_cmd_withdraw_amount
ws->expected_response_code = expected_response_code;
- cmd.cls = ws;
- cmd.label = label;
- cmd.run = &withdraw_run;
- cmd.cleanup = &withdraw_cleanup;
- cmd.traits = &withdraw_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ws,
+ .label = label,
+ .run = &withdraw_run,
+ .cleanup = &withdraw_cleanup,
+ .traits = &withdraw_traits
+ };
+
return cmd;
}
@@ -460,7 +462,6 @@ TALER_TESTING_cmd_withdraw_denomination
const struct TALER_EXCHANGE_DenomPublicKey *dk,
unsigned int expected_response_code)
{
- struct TALER_TESTING_Command cmd;
struct WithdrawState *ws;
if (NULL == dk)
@@ -475,11 +476,14 @@ TALER_TESTING_cmd_withdraw_denomination
ws->pk = dk;
ws->expected_response_code = expected_response_code;
- cmd.cls = ws;
- cmd.label = label;
- cmd.run = &withdraw_run;
- cmd.cleanup = &withdraw_cleanup;
- cmd.traits = &withdraw_traits;
+ struct TALER_TESTING_Command cmd = {
+ .cls = ws,
+ .label = label,
+ .run = &withdraw_run,
+ .cleanup = &withdraw_cleanup,
+ .traits = &withdraw_traits
+ };
+
return cmd;
}