summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refresh_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refresh_link.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refresh_link.c21
1 files changed, 12 insertions, 9 deletions
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 <gnunet/gnunet_util_lib.h>
#include <jansson.h>
#include <microhttpd.h>
+#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;
}