summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_exchanges.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-23 22:21:47 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-23 22:21:47 +0100
commit7aae6c90452c1e9bcae78a5e948f381c1165010a (patch)
treee4520eafe637260b87fabe9f272abd275a3b91d7 /src/auditor/taler-auditor-httpd_exchanges.c
parent51e54bbaa18397f599e5078153671c98c719c695 (diff)
downloadexchange-7aae6c90452c1e9bcae78a5e948f381c1165010a.tar.gz
exchange-7aae6c90452c1e9bcae78a5e948f381c1165010a.tar.bz2
exchange-7aae6c90452c1e9bcae78a5e948f381c1165010a.zip
use CONFLICT for double spending to distinguish properly from FORBIDDEN for bad signatures
Diffstat (limited to 'src/auditor/taler-auditor-httpd_exchanges.c')
-rw-r--r--src/auditor/taler-auditor-httpd_exchanges.c18
1 files changed, 10 insertions, 8 deletions
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 <microhttpd.h>
#include <pthread.h>
#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 */