merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit bcde0fab44e13ef872eb8c414358e5e4613ee3be
parent 325db6147719e85ea9bdf96fc384d98c7067f54d
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Sun, 19 Mar 2017 16:49:40 +0100

Fix indentation.

Diffstat:
Msrc/backenddb/plugin_merchantdb_postgres.c | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -856,52 +856,52 @@ postgres_find_proposal_data_by_date_and_range (void *cls, result = GNUNET_PQ_exec_prepared (pg->conn, "find_proposal_data_by_date_and_range", params); - if (PGRES_TUPLES_OK != PQresultStatus (result)) - { - BREAK_DB_ERR (result); - PQclear (result); - return GNUNET_SYSERR; - } - if (0 == (n = PQntuples (result)) || NULL == cb) - { - PQclear (result); - return n; - } - for (i = 0; i < n; i++) - { - char *order_id; - json_t *proposal_data; - unsigned int row_id; - - struct GNUNET_PQ_ResultSpec rs[] = { - GNUNET_PQ_result_spec_string ("order_id", - &order_id), - TALER_PQ_result_spec_json ("proposal_data", - &proposal_data), - GNUNET_PQ_result_spec_uint32 ("row_id", - &row_id), - GNUNET_PQ_result_spec_end - }; - - if (GNUNET_OK != - GNUNET_PQ_extract_result (result, - rs, - i)) - { - GNUNET_break (0); - PQclear (result); - return GNUNET_SYSERR; - } - cb (cb_cls, - order_id, - row_id, - proposal_data); - - GNUNET_PQ_cleanup_result (rs); - } + if (PGRES_TUPLES_OK != PQresultStatus (result)) + { + BREAK_DB_ERR (result); + PQclear (result); + return GNUNET_SYSERR; + } + if (0 == (n = PQntuples (result)) || NULL == cb) + { + PQclear (result); + return n; + } + for (i = 0; i < n; i++) + { + char *order_id; + json_t *proposal_data; + unsigned int row_id; + + struct GNUNET_PQ_ResultSpec rs[] = { + GNUNET_PQ_result_spec_string ("order_id", + &order_id), + TALER_PQ_result_spec_json ("proposal_data", + &proposal_data), + GNUNET_PQ_result_spec_uint32 ("row_id", + &row_id), + GNUNET_PQ_result_spec_end + }; + + if (GNUNET_OK != + GNUNET_PQ_extract_result (result, + rs, + i)) + { + GNUNET_break (0); PQclear (result); - return n; + return GNUNET_SYSERR; } + cb (cb_cls, + order_id, + row_id, + proposal_data); + + GNUNET_PQ_cleanup_result (rs); + } + PQclear (result); + return n; +} /**