From 7aae6c90452c1e9bcae78a5e948f381c1165010a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 23 Nov 2019 22:21:47 +0100 Subject: use CONFLICT for double spending to distinguish properly from FORBIDDEN for bad signatures --- src/auditor/taler-auditor-httpd_exchanges.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/auditor/taler-auditor-httpd_exchanges.c') diff --git a/src/auditor/taler-auditor-httpd_exchanges.c b/src/auditor/taler-auditor-httpd_exchanges.c index 881c45a23..27b339636 100644 --- a/src/auditor/taler-auditor-httpd_exchanges.c +++ b/src/auditor/taler-auditor-httpd_exchanges.c @@ -25,10 +25,10 @@ #include #include #include "taler_json_lib.h" +#include "taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_db.h" #include "taler-auditor-httpd_exchanges.h" -#include "taler-auditor-httpd_parsing.h" #include "taler-auditor-httpd_responses.h" @@ -43,10 +43,10 @@ static int reply_exchanges_success (struct MHD_Connection *connection, json_t *ja) { - return TAH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o}", - "exchanges", ja); + return TALER_MHD_reply_json_pack (connection, + MHD_HTTP_OK, + "{s:o}", + "exchanges", ja); } @@ -108,8 +108,10 @@ list_exchanges (void *cls, if (GNUNET_DB_STATUS_HARD_ERROR == qs) { TALER_LOG_WARNING ("Failed to handle /exchanges in database\n"); - *mhd_ret = TAH_RESPONSE_reply_internal_db_error (connection, - TALER_EC_LIST_EXCHANGES_DB_ERROR); + *mhd_ret = TALER_MHD_reply_with_error (connection, + MHD_HTTP_INTERNAL_SERVER_ERROR, + TALER_EC_LIST_EXCHANGES_DB_ERROR, + "Could not fetch exchange list from database"); } return qs; } @@ -148,4 +150,4 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh, } -/* end of taler-auditor-httpd_deposit-confirmation.c */ +/* end of taler-auditor-httpd_exchanges.c */ -- cgit v1.2.3