diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-18 11:25:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-18 11:25:38 +0200 |
commit | 6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 (patch) | |
tree | 6f08cc9e4b38aea696b52755afc0565dd1f2c4a9 /src/exchange/taler-exchange-httpd_responses.c | |
parent | b3cbe01079ea1044f8d1f8bf47e995443efe8390 (diff) | |
download | exchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.tar.gz exchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.tar.bz2 exchange-6066ffcb9b07f9e2709d0382afa3fc05c52e21c7.zip |
dead code elimination
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 32 |
1 files changed, 5 insertions, 27 deletions
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,41 +319,19 @@ 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. * * @param connection the MHD connection to use @@ -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, |