summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 15:51:29 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 15:51:29 +0200
commit6a0d1b7df0afefa5468c35c7bcbb4a0fa3a0b46e (patch)
tree9e2aa0cbdfde705bafcfa71bc88442a8b073ad5b /src/backend
parent54bde12c0295e008e050a8418c4702b8f3ea4a55 (diff)
downloadmerchant-6a0d1b7df0afefa5468c35c7bcbb4a0fa3a0b46e.tar.gz
merchant-6a0d1b7df0afefa5468c35c7bcbb4a0fa3a0b46e.tar.bz2
merchant-6a0d1b7df0afefa5468c35c7bcbb4a0fa3a0b46e.zip
reindenting with uncrustify
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_auditors.c15
-rw-r--r--src/backend/taler-merchant-httpd_exchanges.c89
-rw-r--r--src/backend/taler-merchant-httpd_parsing.c28
-rw-r--r--src/backend/taler-merchant-httpd_responses.c11
-rw-r--r--src/backend/taler-merchant-httpd_responses.h16
-rw-r--r--src/backend/taler-merchant-httpd_tip-reserve-helper.c66
6 files changed, 126 insertions, 99 deletions
diff --git a/src/backend/taler-merchant-httpd_auditors.c b/src/backend/taler-merchant-httpd_auditors.c
index f4dea05a..9aab2374 100644
--- a/src/backend/taler-merchant-httpd_auditors.c
+++ b/src/backend/taler-merchant-httpd_auditors.c
@@ -96,10 +96,10 @@ TMH_AUDITORS_check_dk (struct TALER_EXCHANGE_Handle *mh,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- for (unsigned int i=0;i<keys->num_auditors;i++)
+ for (unsigned int i = 0; i<keys->num_auditors; i++)
{
ai = &keys->auditors[i];
- for (unsigned int j=0;j<nauditors;j++)
+ for (unsigned int j = 0; j<nauditors; j++)
{
if (0 == GNUNET_memcmp (&ai->auditor_pub,
&auditors[j].public_key))
@@ -110,7 +110,7 @@ TMH_AUDITORS_check_dk (struct TALER_EXCHANGE_Handle *mh,
TALER_B2S (&auditors[j].public_key));
}
- for (unsigned int k=0;j<ai->num_denom_keys;k++)
+ for (unsigned int k = 0; j<ai->num_denom_keys; k++)
if (&keys->denom_keys[k] == dk)
return GNUNET_OK;
}
@@ -243,8 +243,11 @@ TMH_AUDITORS_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
json_array_append_new (j_auditors,
json_pack ("{s:s, s:o, s:s}",
"name", auditors[cnt].name,
- "auditor_pub", GNUNET_JSON_from_data_auto (&auditors[cnt].public_key),
- "url", auditors[cnt].url)));
+ "auditor_pub",
+ GNUNET_JSON_from_data_auto (
+ &auditors[cnt].public_key),
+ "url",
+ auditors[cnt].url)));
return nauditors;
}
@@ -257,7 +260,7 @@ TMH_AUDITORS_done ()
{
json_decref (j_auditors);
j_auditors = NULL;
- for (unsigned int i=0;i<nauditors;i++)
+ for (unsigned int i = 0; i<nauditors; i++)
{
GNUNET_free (auditors[i].name);
GNUNET_free (auditors[i].url);
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c
index ed6ece98..a589fbaa 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -34,7 +34,8 @@
/**
* Threshold after which exponential backoff should not increase.
*/
-#define RETRY_BACKOFF_THRESHOLD GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define RETRY_BACKOFF_THRESHOLD GNUNET_TIME_relative_multiply ( \
+ GNUNET_TIME_UNIT_SECONDS, 60)
/**
@@ -44,7 +45,10 @@
* @param r current backoff time, initially zero
*/
#define RETRY_BACKOFF(r) GNUNET_TIME_relative_min (RETRY_BACKOFF_THRESHOLD, \
- GNUNET_TIME_relative_multiply (GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, (r)), 2));
+ GNUNET_TIME_relative_multiply ( \
+ GNUNET_TIME_relative_max ( \
+ GNUNET_TIME_UNIT_MILLISECONDS, \
+ (r)), 2));
/**
@@ -261,7 +265,7 @@ json_t *trusted_exchanges;
static void
keys_mgmt_cb (void *cls,
const struct TALER_EXCHANGE_Keys *keys,
- enum TALER_EXCHANGE_VersionCompatibility compat);
+ enum TALER_EXCHANGE_VersionCompatibility compat);
/**
@@ -349,36 +353,36 @@ process_wire_fees (struct Exchange *exchange,
af = GNUNET_new (struct TALER_EXCHANGE_WireAggregateFees);
*af = *fees;
GNUNET_CRYPTO_hash (wire_method,
- strlen (wire_method) + 1,
- &h_wire_method);
+ strlen (wire_method) + 1,
+ &h_wire_method);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Storing wire fee for `%s' and method `%s' at %s in DB; the fee is %s\n",
- TALER_B2S (master_pub),
- wire_method,
- GNUNET_STRINGS_absolute_time_to_string (af->start_date),
- TALER_amount2s (&af->wire_fee));
+ "Storing wire fee for `%s' and method `%s' at %s in DB; the fee is %s\n",
+ TALER_B2S (master_pub),
+ wire_method,
+ GNUNET_STRINGS_absolute_time_to_string (af->start_date),
+ TALER_amount2s (&af->wire_fee));
db->preflight (db->cls);
if (GNUNET_OK !=
db->start (db->cls,
"store wire fee"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to start database transaction!\n");
+ "Failed to start database transaction!\n");
GNUNET_free (af);
return GNUNET_SYSERR;
}
qs = db->store_wire_fee_by_exchange (db->cls,
- master_pub,
- &h_wire_method,
- &af->wire_fee,
- &af->closing_fee,
- af->start_date,
- af->end_date,
- &af->master_sig);
+ master_pub,
+ &h_wire_method,
+ &af->wire_fee,
+ &af->closing_fee,
+ af->start_date,
+ af->end_date,
+ &af->master_sig);
if (0 > qs)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to persist exchange wire fees in merchant DB!\n");
+ "Failed to persist exchange wire fees in merchant DB!\n");
GNUNET_free (af);
fees = fees->next;
db->rollback (db->cls);
@@ -388,7 +392,7 @@ process_wire_fees (struct Exchange *exchange,
{
/* Entry was already in DB, fine, continue as if we had succeeded */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Fees already in DB, rolling back transaction attempt!\n");
+ "Fees already in DB, rolling back transaction attempt!\n");
db->rollback (db->cls);
}
if (0 < qs)
@@ -434,7 +438,7 @@ process_wire_accounts (struct Exchange *exchange,
unsigned int accounts_len,
const struct TALER_EXCHANGE_WireAccount *accounts)
{
- for (unsigned int i=0;i<accounts_len;i++)
+ for (unsigned int i = 0; i<accounts_len; i++)
{
char *method;
@@ -532,8 +536,9 @@ process_find_operations (struct Exchange *exchange)
/* Disagreement on the current time */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Exchange's earliest fee is %s adhead of our time. Clock skew issue?\n",
- GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (af->start_date),
- GNUNET_YES));
+ GNUNET_STRINGS_relative_time_to_string (
+ GNUNET_TIME_absolute_get_remaining (af->start_date),
+ GNUNET_YES));
continue;
}
/* found fee, great! */
@@ -651,9 +656,10 @@ handle_wire_data (void *cls,
"Do not have sufficient wire data. Will re-request /wire in 1 minute\n");
GNUNET_assert (NULL == exchange->wire_task);
- exchange->wire_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
- &wire_task_cb,
- exchange);
+ exchange->wire_task = GNUNET_SCHEDULER_add_delayed (
+ GNUNET_TIME_UNIT_MINUTES,
+ &wire_task_cb,
+ exchange);
}
}
@@ -700,7 +706,7 @@ wire_task_cb (void *cls)
static void
keys_mgmt_cb (void *cls,
const struct TALER_EXCHANGE_Keys *keys,
- enum TALER_EXCHANGE_VersionCompatibility compat)
+ enum TALER_EXCHANGE_VersionCompatibility compat)
{
struct Exchange *exchange = cls;
struct GNUNET_TIME_Absolute expire;
@@ -723,8 +729,8 @@ keys_mgmt_cb (void *cls,
{
/* Give up, log hard error. */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Exchange `%s' runs an incompatible more recent version of the Taler protocol. Will not retry. This client may need to be updated.\n",
- exchange->url);
+ "Exchange `%s' runs an incompatible more recent version of the Taler protocol. Will not retry. This client may need to be updated.\n",
+ exchange->url);
return;
}
exchange->retry_delay = RETRY_BACKOFF (exchange->retry_delay);
@@ -748,8 +754,8 @@ keys_mgmt_cb (void *cls,
{
once = 1;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Exchange `%s' runs a more recent version of the Taler protocol. You may want to update this client.\n",
- exchange->url);
+ "Exchange `%s' runs a more recent version of the Taler protocol. You may want to update this client.\n",
+ exchange->url);
}
}
expire = TALER_EXCHANGE_check_keys_current (exchange->conn,
@@ -824,8 +830,8 @@ return_result (void *cls)
struct TMH_EXCHANGES_FindOperation *
TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
const char *wire_method,
- TMH_EXCHANGES_FindContinuation fc,
- void *fc_cls)
+ TMH_EXCHANGES_FindContinuation fc,
+ void *fc_cls)
{
struct Exchange *exchange;
struct TMH_EXCHANGES_FindOperation *fo;
@@ -843,8 +849,8 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
/* Check if the exchange is known */
for (exchange = exchange_head; NULL != exchange; exchange = exchange->next)
- /* test it by checking public key --- FIXME: hostname or public key!?
- Should probably be URL, not hostname anyway! */
+ /* test it by checking public key --- FIXME: hostname or public key!?
+ Should probably be URL, not hostname anyway! */
{
if (0 == strcmp (exchange->url,
chosen_exchange))
@@ -934,7 +940,7 @@ TMH_EXCHANGES_find_exchange_cancel (struct TMH_EXCHANGES_FindOperation *fo)
{
GNUNET_SCHEDULER_cancel (fo->at);
fo->at = NULL;
- }
+ }
GNUNET_CONTAINER_DLL_remove (exchange->fo_head,
exchange->fo_tail,
fo);
@@ -1008,7 +1014,8 @@ accept_exchanges (void *cls,
if (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_public_key_from_string (mks,
strlen (mks),
- &exchange->master_pub.eddsa_pub))
+ &exchange->master_pub.
+ eddsa_pub))
{
exchange->trusted = GNUNET_YES;
}
@@ -1017,7 +1024,7 @@ accept_exchanges (void *cls,
GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
section,
"MASTER_KEY",
- _("ill-formed key"));
+ _ ("ill-formed key"));
}
GNUNET_free (mks);
}
@@ -1056,7 +1063,8 @@ TMH_EXCHANGES_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
GNUNET_break (0);
return GNUNET_SYSERR;
}
- GNUNET_CURL_enable_async_scope_header (merchant_curl_ctx, "Taler-Correlation-Id");
+ GNUNET_CURL_enable_async_scope_header (merchant_curl_ctx,
+ "Taler-Correlation-Id");
merchant_curl_rc = GNUNET_CURL_gnunet_rc_create (merchant_curl_ctx);
/* get exchanges from the merchant configuration and try to connect to them */
GNUNET_CONFIGURATION_iterate_sections (cfg,
@@ -1074,7 +1082,8 @@ TMH_EXCHANGES_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
continue;
j_exchange = json_pack ("{s:s, s:o}",
"url", exchange->url,
- "master_pub", GNUNET_JSON_from_data_auto (&exchange->master_pub));
+ "master_pub", GNUNET_JSON_from_data_auto (
+ &exchange->master_pub));
GNUNET_assert (0 ==
json_array_append_new (trusted_exchanges,
j_exchange));
diff --git a/src/backend/taler-merchant-httpd_parsing.c b/src/backend/taler-merchant-httpd_parsing.c
index 743999df..7e21482a 100644
--- a/src/backend/taler-merchant-httpd_parsing.c
+++ b/src/backend/taler-merchant-httpd_parsing.c
@@ -37,12 +37,12 @@
/**
* Initial size for POST request buffer.
*/
-#define REQUEST_BUFFER_INITIAL (2*1024)
+#define REQUEST_BUFFER_INITIAL (2 * 1024)
/**
* Maximum POST request size.
*/
-#define REQUEST_BUFFER_MAX (1024*1024)
+#define REQUEST_BUFFER_MAX (1024 * 1024)
/**
@@ -147,21 +147,21 @@ TMH_PARSE_post_json (struct MHD_Connection *connection,
case GNUNET_JSON_PR_OUT_OF_MEMORY:
return (MHD_NO == TMH_RESPONSE_reply_internal_error
- (connection,
- TALER_EC_PARSER_OUT_OF_MEMORY,
- "out of memory")) ? GNUNET_SYSERR : GNUNET_NO;
+ (connection,
+ TALER_EC_PARSER_OUT_OF_MEMORY,
+ "out of memory")) ? GNUNET_SYSERR : GNUNET_NO;
case GNUNET_JSON_PR_CONTINUE:
return GNUNET_YES;
case GNUNET_JSON_PR_REQUEST_TOO_LARGE:
return (MHD_NO == TMH_RESPONSE_reply_request_too_large
- (connection)) ? GNUNET_SYSERR : GNUNET_NO;
+ (connection)) ? GNUNET_SYSERR : GNUNET_NO;
case GNUNET_JSON_PR_JSON_INVALID:
return (MHD_YES ==
TMH_RESPONSE_reply_invalid_json (connection))
- ? GNUNET_NO : GNUNET_SYSERR;
+ ? GNUNET_NO : GNUNET_SYSERR;
case GNUNET_JSON_PR_SUCCESS:
GNUNET_break (NULL != *json);
return GNUNET_YES;
@@ -213,7 +213,7 @@ TMH_PARSE_json_data (struct MHD_Connection *connection,
"error", "parse error",
"field", error_json_name,
"line", (json_int_t) error_line))
- ? GNUNET_NO : GNUNET_SYSERR;
+ ? GNUNET_NO : GNUNET_SYSERR;
return ret;
}
return GNUNET_YES;
@@ -251,9 +251,9 @@ TMH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection,
{
return (MHD_NO ==
TMH_RESPONSE_reply_arg_missing (connection,
- TALER_EC_PARAMETER_MISSING,
- param_name))
- ? GNUNET_SYSERR : GNUNET_NO;
+ TALER_EC_PARAMETER_MISSING,
+ param_name))
+ ? GNUNET_SYSERR : GNUNET_NO;
}
if (GNUNET_OK !=
GNUNET_STRINGS_string_to_data (str,
@@ -262,9 +262,9 @@ TMH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection,
out_size))
return (MHD_NO ==
TMH_RESPONSE_reply_arg_invalid (connection,
- TALER_EC_PARAMETER_MALFORMED,
- param_name))
- ? GNUNET_SYSERR : GNUNET_NO;
+ TALER_EC_PARAMETER_MALFORMED,
+ param_name))
+ ? GNUNET_SYSERR : GNUNET_NO;
return GNUNET_OK;
}
diff --git a/src/backend/taler-merchant-httpd_responses.c b/src/backend/taler-merchant-httpd_responses.c
index 2b5832f6..9c847f3a 100644
--- a/src/backend/taler-merchant-httpd_responses.c
+++ b/src/backend/taler-merchant-httpd_responses.c
@@ -43,7 +43,7 @@ TMH_RESPONSE_make_json (const json_t *json)
char *json_str;
json_str = json_dumps (json,
- JSON_INDENT(2));
+ JSON_INDENT (2));
if (NULL == json_str)
{
GNUNET_break (0);
@@ -111,9 +111,9 @@ TMH_RESPONSE_make_json_pack (const char *fmt,
va_start (argp, fmt);
json = json_vpack_ex (&jerror,
- 0,
- fmt,
- argp);
+ 0,
+ fmt,
+ argp);
va_end (argp);
if (NULL == json)
{
@@ -273,7 +273,8 @@ TMH_RESPONSE_reply_invalid_json (struct MHD_Connection *connection)
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_BAD_REQUEST,
"{s:I, s:s}",
- "code", (json_int_t) TALER_EC_JSON_INVALID,
+ "code",
+ (json_int_t) TALER_EC_JSON_INVALID,
"error", "invalid json");
}
diff --git a/src/backend/taler-merchant-httpd_responses.h b/src/backend/taler-merchant-httpd_responses.h
index 3dbd0049..708185c9 100644
--- a/src/backend/taler-merchant-httpd_responses.h
+++ b/src/backend/taler-merchant-httpd_responses.h
@@ -124,7 +124,7 @@ TMH_RESPONSE_reply_rc (struct MHD_Connection *connection,
*/
int
TMH_RESPONSE_reply_not_found (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *object);
@@ -138,7 +138,7 @@ TMH_RESPONSE_reply_not_found (struct MHD_Connection *connection,
*/
int
TMH_RESPONSE_reply_bad_request (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *issue);
@@ -151,7 +151,7 @@ TMH_RESPONSE_reply_bad_request (struct MHD_Connection *connection,
*/
struct MHD_Response *
TMH_RESPONSE_make_internal_error (enum TALER_ErrorCode ec,
- const char *hint);
+ const char *hint);
/**
@@ -164,7 +164,7 @@ TMH_RESPONSE_make_internal_error (enum TALER_ErrorCode ec,
*/
int
TMH_RESPONSE_reply_external_error (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *hint);
@@ -178,7 +178,7 @@ TMH_RESPONSE_reply_external_error (struct MHD_Connection *connection,
*/
int
TMH_RESPONSE_reply_internal_error (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *hint);
@@ -191,7 +191,7 @@ TMH_RESPONSE_reply_internal_error (struct MHD_Connection *connection,
*/
struct MHD_Response *
TMH_RESPONSE_make_error (enum TALER_ErrorCode ec,
- const char *hint);
+ const char *hint);
/**
@@ -225,7 +225,7 @@ TMH_RESPONSE_add_global_headers (struct MHD_Response *response);
*/
int
TMH_RESPONSE_reply_arg_missing (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *param_name);
@@ -239,7 +239,7 @@ TMH_RESPONSE_reply_arg_missing (struct MHD_Connection *connection,
*/
int
TMH_RESPONSE_reply_arg_invalid (struct MHD_Connection *connection,
- enum TALER_ErrorCode ec,
+ enum TALER_ErrorCode ec,
const char *param_name);
#endif
diff --git a/src/backend/taler-merchant-httpd_tip-reserve-helper.c b/src/backend/taler-merchant-httpd_tip-reserve-helper.c
index 1cf721cd..413eefc8 100644
--- a/src/backend/taler-merchant-httpd_tip-reserve-helper.c
+++ b/src/backend/taler-merchant-httpd_tip-reserve-helper.c
@@ -121,8 +121,9 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_SERVICE_UNAVAILABLE,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_FAILED_EMPTY,
- "Exchange returned empty reserve history"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_FAILED_EMPTY,
+ "Exchange returned empty reserve history"));
return;
}
@@ -131,8 +132,9 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_SERVICE_UNAVAILABLE,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_INVALID_NO_DEPOSIT,
- "Exchange returned invalid reserve history"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_INVALID_NO_DEPOSIT,
+ "Exchange returned invalid reserve history"));
return;
}
@@ -143,8 +145,9 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_SERVICE_UNAVAILABLE,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_INVALID_CURRENCY,
- "Exchange returned invalid reserve history"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_INVALID_CURRENCY,
+ "Exchange returned invalid reserve history"));
return;
}
@@ -154,8 +157,9 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_SERVICE_UNAVAILABLE,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_CURRENCY_MISSMATCH,
- "Exchange currency unexpected"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_CURRENCY_MISSMATCH,
+ "Exchange currency unexpected"));
return;
}
@@ -164,7 +168,7 @@ handle_status (void *cls,
ctr->amount_deposited = ctr->amount_withdrawn;
/* Update DB based on status! */
- for (unsigned int i=0;i<history_length;i++)
+ for (unsigned int i = 0; i<history_length; i++)
{
switch (history[i].type)
{
@@ -174,12 +178,15 @@ handle_status (void *cls,
struct GNUNET_HashCode uuid;
struct GNUNET_TIME_Absolute deposit_expiration;
- deposit_expiration = GNUNET_TIME_absolute_add (history[i].details.in_details.timestamp,
- ctr->idle_reserve_expiration_time);
+ deposit_expiration = GNUNET_TIME_absolute_add (
+ history[i].details.in_details.timestamp,
+ ctr->
+ idle_reserve_expiration_time);
/* We're interested in the latest DEPOSIT timestamp, since this determines the
* reserve's expiration date. Note that the history isn't chronologically ordered. */
- ctr->reserve_expiration = GNUNET_TIME_absolute_max (ctr->reserve_expiration,
- deposit_expiration);
+ ctr->reserve_expiration = GNUNET_TIME_absolute_max (
+ ctr->reserve_expiration,
+ deposit_expiration);
GNUNET_CRYPTO_hash (history[i].details.in_details.wire_reference,
history[i].details.in_details.wire_reference_size,
&uuid);
@@ -197,15 +204,17 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_DEPOSIT,
- "Exchange returned invalid reserve history (amount overflow)"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_DEPOSIT,
+ "Exchange returned invalid reserve history (amount overflow)"));
return;
}
if (0 > qs)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Database error updating tipping reserve status: %d\n"),
+ _ (
+ "Database error updating tipping reserve status: %d\n"),
qs);
}
}
@@ -219,14 +228,16 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_WITHDRAW,
- "Exchange returned invalid reserve history (amount overflow)"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_WITHDRAW,
+ "Exchange returned invalid reserve history (amount overflow)"));
return;
}
break;
case TALER_EXCHANGE_RTT_PAYBACK:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Encountered unsupported /payback operation on tipping reserve\n"));
+ _ (
+ "Encountered unsupported /payback operation on tipping reserve\n"));
/* FIXME: probably should count these like deposits!? */
break;
case TALER_EXCHANGE_RTT_CLOSE:
@@ -239,8 +250,9 @@ handle_status (void *cls,
GNUNET_break_op (0);
resume_with_response (ctr,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_CLOSED,
- "Exchange returned invalid reserve history (amount overflow)"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_HISTORY_ARITHMETIC_ISSUE_CLOSED,
+ "Exchange returned invalid reserve history (amount overflow)"));
return;
}
break;
@@ -278,11 +290,12 @@ exchange_cont (void *cls,
if (NULL == eh)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to contact exchange configured for tipping!\n"));
+ _ ("Failed to contact exchange configured for tipping!\n"));
resume_with_response (ctr,
MHD_HTTP_SERVICE_UNAVAILABLE,
- TMH_RESPONSE_make_error (TALER_EC_TIP_QUERY_RESERVE_STATUS_FAILED_EXCHANGE_DOWN,
- "Unable to obtain /keys from exchange"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_TIP_QUERY_RESERVE_STATUS_FAILED_EXCHANGE_DOWN,
+ "Unable to obtain /keys from exchange"));
return;
}
keys = TALER_EXCHANGE_get_keys (eh);
@@ -326,8 +339,9 @@ TMH_check_tip_reserve (struct CheckTipReserve *ctr,
GNUNET_break (0);
resume_with_response (ctr,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TMH_RESPONSE_make_error (TALER_EC_INTERNAL_INVARIANT_FAILURE,
- "Unable to find exchange handle"));
+ TMH_RESPONSE_make_error (
+ TALER_EC_INTERNAL_INVARIANT_FAILURE,
+ "Unable to find exchange handle"));
}
}