diff options
Diffstat (limited to 'src/exchange')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 8 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_db.c | 2 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_keystate.c | 3 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_payback.c | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 6b285a3c..b40eaf3a 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -32,6 +32,7 @@ #include "taler-exchange-httpd_deposit.h" #include "taler-exchange-httpd_refund.h" #include "taler-exchange-httpd_reserve.h" +#include "taler-exchange-httpd_payback.h" #include "taler-exchange-httpd_wire.h" #include "taler-exchange-httpd_refresh.h" #include "taler-exchange-httpd_tracking.h" @@ -295,6 +296,13 @@ handle_mhd_request (void *cls, "Only POST is allowed", 0, &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, + { "/payback", MHD_HTTP_METHOD_POST, "application/json", + NULL, 0, + &TEH_PAYBACK_handler_payback, MHD_HTTP_OK }, + { "/refresh/link", NULL, "text/plain", + "Only GET is allowed", 0, + &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, + { NULL, NULL, NULL, NULL, 0, 0 } }; static struct TEH_RequestHandler h404 = diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index 191e2a4b..57be1970 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -192,7 +192,7 @@ calculate_transaction_list_totals (struct TALER_EXCHANGEDB_TransactionList *tl, } } /* spent = spent - refunded */ - if (GNUNET_OK != + if (GNUNET_SYSERR == TALER_amount_subtract (&spent, &spent, &refunded)) diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index 2b701959..95ddd04b 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -308,6 +308,9 @@ reload_keys_denom_iter (void *cls, if (NULL != revocation_master_sig) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Adding denomination key `%s' to revokation set\n", + alias); res = store_in_map (ctx->revoked_map, dki); if (GNUNET_NO == res) diff --git a/src/exchange/taler-exchange-httpd_payback.c b/src/exchange/taler-exchange-httpd_payback.c index b4b664f9..7e1c7084 100644 --- a/src/exchange/taler-exchange-httpd_payback.c +++ b/src/exchange/taler-exchange-httpd_payback.c @@ -168,7 +168,7 @@ TEH_PAYBACK_handler_payback (struct TEH_RequestHandler *rh, struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_denomination_public_key ("denom_pub", &coin.denom_pub), - TALER_JSON_spec_denomination_signature ("ub_sig", + TALER_JSON_spec_denomination_signature ("denom_sig", &coin.denom_sig), GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin.coin_pub), |