summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-01 17:51:46 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-01 17:51:46 +0100
commit113f3891d13a15b87827a8b1b33508231a1409b7 (patch)
tree8b665c481282b0d3778deee534fd2b36b992608c /src/exchange
parentc11475c081afcd5ccc667451b9383510fd42cf1b (diff)
downloadexchange-113f3891d13a15b87827a8b1b33508231a1409b7.tar.gz
exchange-113f3891d13a15b87827a8b1b33508231a1409b7.tar.bz2
exchange-113f3891d13a15b87827a8b1b33508231a1409b7.zip
removing dead code, using more named constants, checking return values better
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-aggregator.c8
-rw-r--r--src/exchange/taler-exchange-httpd.c2
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.c2
-rw-r--r--src/exchange/taler-exchange-httpd_transfers_get.c2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 1a8889fd..bf066d84 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -405,6 +405,7 @@ update_fees (struct WireAccount *wa,
&p->master_sig);
if (qs < 0)
{
+ GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
TALER_EXCHANGEDB_fees_free (wa->af);
wa->af = NULL;
return NULL;
@@ -854,10 +855,9 @@ deposit_cb (void *cls,
au->session);
if (NULL == af)
{
- if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
- qs = GNUNET_DB_STATUS_HARD_ERROR;
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
- return qs;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Could not get or persist wire fees. Aborting run.\n");
+ return GNUNET_DB_STATUS_HARD_ERROR;
}
au->wire_fee = af->wire_fee;
}
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index 153bb19f..0061ac86 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -615,6 +615,8 @@ handle_mhd_request (void *cls,
/* strange, should start with '/', treat as just "/" */
url = "/";
start = strchr (url + 1, '/');
+ if (NULL == start)
+ start = "";
ret = proceed_with_handler (ecls->rh,
connection,
start,
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c
index add201aa..9be78e5e 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -2338,7 +2338,7 @@ TEH_KS_sign (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
/* This *can* happen if the exchange's keys are
not properly maintained. */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _ ("Cannot sign request, no valid keys available\n"));
+ "Cannot sign request, no valid keys available\n");
return GNUNET_SYSERR;
}
*pub = key_state->current_sign_key_issue.issue.signkey_pub;
diff --git a/src/exchange/taler-exchange-httpd_transfers_get.c b/src/exchange/taler-exchange-httpd_transfers_get.c
index 713b43a5..e7fceb49 100644
--- a/src/exchange/taler-exchange-httpd_transfers_get.c
+++ b/src/exchange/taler-exchange-httpd_transfers_get.c
@@ -434,7 +434,7 @@ track_transfer_transaction (void *cls,
if (0 >= qs)
{
if ( (GNUNET_DB_STATUS_HARD_ERROR == qs) ||
- (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS) )
+ (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) )
{
GNUNET_break (0);
*mhd_ret = TALER_MHD_reply_with_error (connection,