summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-19 17:11:35 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-19 17:11:35 +0200
commit9dab61c91a7f2cf7ec9d6030935226cf338ee439 (patch)
tree1f788a65f1ec989b2562c146f7ef1e5a5a3b9808 /src/exchangedb/plugin_exchangedb_postgres.c
parentf2b20f3ad03c1af34ab40359e2c226457aa61a5b (diff)
downloadexchange-9dab61c91a7f2cf7ec9d6030935226cf338ee439.tar.gz
exchange-9dab61c91a7f2cf7ec9d6030935226cf338ee439.tar.bz2
exchange-9dab61c91a7f2cf7ec9d6030935226cf338ee439.zip
more work on #4401
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 82585c068..aaf565d27 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -2755,8 +2755,8 @@ postgres_get_refresh_session (void *cls,
};
result = GNUNET_PQ_exec_prepared (session->conn,
- "get_refresh_session",
- params);
+ "get_refresh_session",
+ params);
if (PGRES_TUPLES_OK != PQresultStatus (result))
{
BREAK_DB_ERR (result);
@@ -2782,15 +2782,20 @@ postgres_get_refresh_session (void *cls,
{
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_uint16 ("num_newcoins",
- &refresh_session->num_newcoins),
+ &refresh_session->num_newcoins),
GNUNET_PQ_result_spec_uint16 ("noreveal_index",
- &refresh_session->noreveal_index),
- GNUNET_PQ_result_spec_auto_from_type ("old_coin_pub", &refresh_session->melt.coin.coin_pub),
- GNUNET_PQ_result_spec_auto_from_type ("old_coin_sig", &refresh_session->melt.coin_sig),
- TALER_PQ_result_spec_amount ("amount_with_fee", &refresh_session->melt.amount_with_fee),
- TALER_PQ_result_spec_amount ("melt_fee", &refresh_session->melt.melt_fee),
+ &refresh_session->noreveal_index),
+ GNUNET_PQ_result_spec_auto_from_type ("old_coin_pub",
+ &refresh_session->melt.coin.coin_pub),
+ GNUNET_PQ_result_spec_auto_from_type ("old_coin_sig",
+ &refresh_session->melt.coin_sig),
+ TALER_PQ_result_spec_amount ("amount_with_fee",
+ &refresh_session->melt.amount_with_fee),
+ TALER_PQ_result_spec_amount ("melt_fee",
+ &refresh_session->melt.melt_fee),
GNUNET_PQ_result_spec_end
};
+
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result, rs, 0))
{
@@ -3429,8 +3434,8 @@ postgres_insert_refresh_out (void *cls,
};
result = GNUNET_PQ_exec_prepared (session->conn,
- "insert_refresh_out",
- params);
+ "insert_refresh_out",
+ params);
if (PGRES_COMMAND_OK != PQresultStatus (result))
{
BREAK_DB_ERR (result);
@@ -3469,7 +3474,6 @@ postgres_get_link_data_list (void *cls,
result = GNUNET_PQ_exec_prepared (session->conn,
"get_link",
params);
-
ldl = NULL;
if (PGRES_TUPLES_OK != PQresultStatus (result))
{
@@ -3493,12 +3497,12 @@ postgres_get_link_data_list (void *cls,
size_t ld_buf_size;
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_variable_size ("link_vector_enc",
- &ld_buf,
- &ld_buf_size),
+ &ld_buf,
+ &ld_buf_size),
GNUNET_PQ_result_spec_rsa_signature ("ev_sig",
- &sig),
+ &sig),
GNUNET_PQ_result_spec_rsa_public_key ("denom_pub",
- &denom_pub),
+ &denom_pub),
GNUNET_PQ_result_spec_end
};