From 6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 18 Jun 2019 11:25:38 +0200 Subject: dead code elimination --- src/exchange/taler-exchange-httpd_responses.c | 32 +++++---------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_responses.c') diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 234a0107b..8b2420962 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -319,40 +319,18 @@ TEH_RESPONSE_reply_signature_invalid (struct MHD_Connection *connection, */ int TEH_RESPONSE_reply_arg_missing (struct MHD_Connection *connection, - enum TALER_ErrorCode ec, + enum TALER_ErrorCode ec, const char *param_name) { return TEH_RESPONSE_reply_json_pack (connection, MHD_HTTP_BAD_REQUEST, "{s:s, s:I, s:s}", "error", "missing parameter", - "code", (json_int_t) ec, + "code", (json_int_t) ec, "parameter", param_name); } -/** - * Send a response indicating permission denied. - * - * @param connection the MHD connection to use - * @param ec error code uniquely identifying the error - * @param hint hint about why access was denied - * @return a MHD result code - */ -int -TEH_RESPONSE_reply_permission_denied (struct MHD_Connection *connection, - enum TALER_ErrorCode ec, - const char *hint) -{ - return TEH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_FORBIDDEN, - "{s:s, s:I, s:s}", - "error", "permission denied", - "code", (json_int_t) ec, - "hint", hint); -} - - /** * Send a response indicating an internal error. * @@ -363,14 +341,14 @@ TEH_RESPONSE_reply_permission_denied (struct MHD_Connection *connection, */ int TEH_RESPONSE_reply_internal_error (struct MHD_Connection *connection, - enum TALER_ErrorCode ec, + enum TALER_ErrorCode ec, const char *hint) { return TEH_RESPONSE_reply_json_pack (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "{s:s, s:I, s:s}", "error", "internal error", - "code", (json_int_t) ec, + "code", (json_int_t) ec, "hint", hint); } @@ -385,7 +363,7 @@ TEH_RESPONSE_reply_internal_error (struct MHD_Connection *connection, */ int TEH_RESPONSE_reply_external_error (struct MHD_Connection *connection, - enum TALER_ErrorCode ec, + enum TALER_ErrorCode ec, const char *hint) { return TEH_RESPONSE_reply_json_pack (connection, -- cgit v1.2.3