summaryrefslogtreecommitdiff
path: root/src/exchangedb/perf_taler_exchangedb_interpreter.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
commitc0451f0982bdb565f431417cea3ab0238342d125 (patch)
tree4a27b418a74acd0fa5d6bb789818ced43c4832d5 /src/exchangedb/perf_taler_exchangedb_interpreter.c
parent3f468773e71b68e9ceb5431e797941b1cc086e68 (diff)
downloadexchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.gz
exchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.bz2
exchange-c0451f0982bdb565f431417cea3ab0238342d125.zip
fix #4533 for exchange (breaks interaction with bank for /admin/add/incoming)
Diffstat (limited to 'src/exchangedb/perf_taler_exchangedb_interpreter.c')
-rw-r--r--src/exchangedb/perf_taler_exchangedb_interpreter.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_interpreter.c b/src/exchangedb/perf_taler_exchangedb_interpreter.c
index 5a2eed95f..e6268ebbc 100644
--- a/src/exchangedb/perf_taler_exchangedb_interpreter.c
+++ b/src/exchangedb/perf_taler_exchangedb_interpreter.c
@@ -1373,23 +1373,31 @@ interpret (struct PERF_TALER_EXCHANGEDB_interpreter_state *state)
unsigned int reserve_index;
int ret;
struct PERF_TALER_EXCHANGEDB_Reserve *reserve;
- json_t *details = NULL;
+ json_t *sndr;
+ json_t *just;
reserve_index = state->cmd[state->i].details.insert_reserve.index_reserve;
reserve = state->cmd[reserve_index].exposed.data.reserve;
- details = json_pack ("{s:i}","justification",
- GNUNET_CRYPTO_random_u32 (
- GNUNET_CRYPTO_QUALITY_WEAK,
- UINT32_MAX));
- GNUNET_assert (NULL != details);
+ sndr = json_pack ("{s:i}",
+ "account",
+ (int) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ UINT32_MAX));
+ just = json_pack ("{s:i}",
+ "justification",
+ (int) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ UINT32_MAX));
+ GNUNET_assert (NULL != just);
+ GNUNET_assert (NULL != sndr);
ret = state->plugin->reserves_in_insert (state->plugin->cls,
state->session,
&reserve->reserve.pub,
&reserve->reserve.balance,
GNUNET_TIME_absolute_get (),
- details);
+ sndr,
+ just);
GNUNET_assert (GNUNET_SYSERR != ret);
- json_decref (details);
+ json_decref (sndr);
+ json_decref (just);
}
break;