From e8a88392da98c3325ba39b20901a5c220158d1f5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 23 Nov 2019 18:47:07 +0100 Subject: more refactoring towards using libtalermhd --- src/exchange/taler-exchange-httpd_refresh_link.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_refresh_link.c') diff --git a/src/exchange/taler-exchange-httpd_refresh_link.c b/src/exchange/taler-exchange-httpd_refresh_link.c index c51887a95..10aed2df8 100644 --- a/src/exchange/taler-exchange-httpd_refresh_link.c +++ b/src/exchange/taler-exchange-httpd_refresh_link.c @@ -24,6 +24,7 @@ #include #include #include +#include "taler_mhd_lib.h" #include "taler-exchange-httpd_parsing.h" #include "taler-exchange-httpd_mhd.h" #include "taler-exchange-httpd_refresh_link.h" @@ -156,16 +157,18 @@ refresh_link_transaction (void *cls, ctx); if (NULL == ctx->mlist) { - *mhd_ret = TEH_RESPONSE_reply_internal_error (connection, - ctx->ec, - "coin_pub"); + *mhd_ret = TALER_MHD_reply_with_error (connection, + MHD_HTTP_INTERNAL_SERVER_ERROR, + ctx->ec, + "coin_pub"); return GNUNET_DB_STATUS_HARD_ERROR; } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) { - *mhd_ret = TEH_RESPONSE_reply_arg_unknown (connection, - TALER_EC_REFRESH_LINK_COIN_UNKNOWN, - "coin_pub"); + *mhd_ret = TALER_MHD_reply_with_error (connection, + MHD_HTTP_NOT_FOUND, + TALER_EC_REFRESH_LINK_COIN_UNKNOWN, + "coin_pub"); return GNUNET_DB_STATUS_HARD_ERROR; } return qs; @@ -222,9 +225,9 @@ TEH_REFRESH_handler_refresh_link (struct TEH_RequestHandler *rh, json_decref (ctx.mlist); return mhd_ret; } - mhd_ret = TEH_RESPONSE_reply_json (connection, - ctx.mlist, - MHD_HTTP_OK); + mhd_ret = TALER_MHD_reply_json (connection, + ctx.mlist, + MHD_HTTP_OK); json_decref (ctx.mlist); return mhd_ret; } -- cgit v1.2.3