summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_db.c
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-25 16:18:24 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-25 16:18:24 +0200
commiteb559970846f0fa27f1f25c482cd07210a56f4b1 (patch)
tree8526637825e520e1420b17515934ced794a33c01 /src/auditor/taler-auditor-httpd_db.c
parent3742239c13001433eeade439a0e0490f07351c43 (diff)
downloadexchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.tar.gz
exchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.tar.bz2
exchange-eb559970846f0fa27f1f25c482cd07210a56f4b1.zip
re-format code
Diffstat (limited to 'src/auditor/taler-auditor-httpd_db.c')
-rw-r--r--src/auditor/taler-auditor-httpd_db.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/auditor/taler-auditor-httpd_db.c b/src/auditor/taler-auditor-httpd_db.c
index 846829551..e0ab8f2e1 100644
--- a/src/auditor/taler-auditor-httpd_db.c
+++ b/src/auditor/taler-auditor-httpd_db.c
@@ -51,9 +51,9 @@
int
TAH_DB_run_transaction (struct MHD_Connection *connection,
const char *name,
- int *mhd_ret,
- TAH_DB_TransactionCallback cb,
- void *cb_cls)
+ int *mhd_ret,
+ TAH_DB_TransactionCallback cb,
+ void *cb_cls)
{
struct TALER_AUDITORDB_Session *session;
@@ -64,46 +64,47 @@ TAH_DB_run_transaction (struct MHD_Connection *connection,
GNUNET_break (0);
if (NULL != mhd_ret)
*mhd_ret = TAH_RESPONSE_reply_internal_db_error (connection,
- TALER_EC_DB_SETUP_FAILED);
+ TALER_EC_DB_SETUP_FAILED);
return GNUNET_SYSERR;
}
// TAH_plugin->preflight (TAH_plugin->cls, session); // FIXME: needed?
- for (unsigned int retries = 0;retries < MAX_TRANSACTION_COMMIT_RETRIES; retries++)
+ for (unsigned int retries = 0; retries < MAX_TRANSACTION_COMMIT_RETRIES;
+ retries++)
{
enum GNUNET_DB_QueryStatus qs;
if (GNUNET_OK !=
- TAH_plugin->start (TAH_plugin->cls,
- session))
+ TAH_plugin->start (TAH_plugin->cls,
+ session))
{
GNUNET_break (0);
if (NULL != mhd_ret)
- *mhd_ret = TAH_RESPONSE_reply_internal_db_error (connection,
- TALER_EC_DB_START_FAILED);
+ *mhd_ret = TAH_RESPONSE_reply_internal_db_error (connection,
+ TALER_EC_DB_START_FAILED);
return GNUNET_SYSERR;
}
qs = cb (cb_cls,
- connection,
- session,
- mhd_ret);
+ connection,
+ session,
+ mhd_ret);
if (0 > qs)
TAH_plugin->rollback (TAH_plugin->cls,
- session);
+ session);
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
return GNUNET_SYSERR;
if (0 <= qs)
qs = TAH_plugin->commit (TAH_plugin->cls,
- session);
+ session);
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
{
if (NULL != mhd_ret)
- *mhd_ret = TAH_RESPONSE_reply_commit_error (connection,
- TALER_EC_DB_COMMIT_FAILED_HARD);
+ *mhd_ret = TAH_RESPONSE_reply_commit_error (connection,
+ TALER_EC_DB_COMMIT_FAILED_HARD);
return GNUNET_SYSERR;
}
/* make sure callback did not violate invariants! */
GNUNET_assert ( (NULL == mhd_ret) ||
- (-1 == *mhd_ret) );
+ (-1 == *mhd_ret) );
if (0 <= qs)
return GNUNET_OK;
}
@@ -112,7 +113,7 @@ TAH_DB_run_transaction (struct MHD_Connection *connection,
MAX_TRANSACTION_COMMIT_RETRIES);
if (NULL != mhd_ret)
*mhd_ret = TAH_RESPONSE_reply_commit_error (connection,
- TALER_EC_DB_COMMIT_FAILED_ON_RETRY);
+ TALER_EC_DB_COMMIT_FAILED_ON_RETRY);
return GNUNET_SYSERR;
}