From 744322fdda3c459524a981e32211f987ef8ca983 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 Mar 2020 00:50:18 +0100 Subject: the big EC rename --- src/exchange/taler-exchange-httpd_deposits_get.c | 8 ++--- src/exchange/taler-exchange-httpd_link.c | 2 +- src/exchange/taler-exchange-httpd_melt.c | 22 ++++++------ .../taler-exchange-httpd_refreshes_reveal.c | 40 +++++++++++----------- src/exchange/taler-exchange-httpd_transfers_get.c | 10 +++--- 5 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/exchange') diff --git a/src/exchange/taler-exchange-httpd_deposits_get.c b/src/exchange/taler-exchange-httpd_deposits_get.c index 477473cc7..8a0e1494c 100644 --- a/src/exchange/taler-exchange-httpd_deposits_get.c +++ b/src/exchange/taler-exchange-httpd_deposits_get.c @@ -233,7 +233,7 @@ deposits_get_transaction (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSACTION_DB_FETCH_FAILED, + TALER_EC_DEPOSITS_GET_DB_FETCH_FAILED, "failed to fetch transaction data"); } return qs; @@ -242,7 +242,7 @@ deposits_get_transaction (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_TRACK_TRANSACTION_NOT_FOUND, + TALER_EC_DEPOSITS_GET_NOT_FOUND, "transaction unknown"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -288,7 +288,7 @@ handle_track_transaction_request ( if (GNUNET_SYSERR == ctx.pending) return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSACTION_DB_FEE_INCONSISTENT, + TALER_EC_DEPOSITS_GET_DB_FEE_INCONSISTENT, "fees are inconsistent"); return reply_deposit_details (connection, &tps->h_contract_terms, @@ -387,7 +387,7 @@ TEH_handler_deposits_get (const struct TEH_RequestHandler *rh, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_TRACK_TRANSACTION_MERCHANT_SIGNATURE_INVALID, + TALER_EC_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID, "merchant_sig"); } diff --git a/src/exchange/taler-exchange-httpd_link.c b/src/exchange/taler-exchange-httpd_link.c index f1838dacf..4738a435f 100644 --- a/src/exchange/taler-exchange-httpd_link.c +++ b/src/exchange/taler-exchange-httpd_link.c @@ -164,7 +164,7 @@ link_transaction (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_REFRESH_LINK_COIN_UNKNOWN, + TALER_EC_LINK_COIN_UNKNOWN, "coin_pub"); return GNUNET_DB_STATUS_HARD_ERROR; } diff --git a/src/exchange/taler-exchange-httpd_melt.c b/src/exchange/taler-exchange-httpd_melt.c index 77fb19362..c4c80c130 100644 --- a/src/exchange/taler-exchange-httpd_melt.c +++ b/src/exchange/taler-exchange-httpd_melt.c @@ -63,7 +63,7 @@ reply_melt_insufficient_funds ( if (NULL == history) return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS, + TALER_EC_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS, "Failed to compile transaction history"); return TALER_MHD_reply_json_pack (connection, MHD_HTTP_CONFLICT, @@ -72,7 +72,7 @@ reply_melt_insufficient_funds ( "insufficient funds", "code", (json_int_t) - TALER_EC_REFRESH_MELT_INSUFFICIENT_FUNDS, + TALER_EC_MELT_INSUFFICIENT_FUNDS, "coin_pub", GNUNET_JSON_from_data_auto (coin_pub), "original_value", @@ -195,7 +195,7 @@ refresh_check_melt (struct MHD_Connection *connection, if (GNUNET_DB_STATUS_HARD_ERROR == qs) *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_DB_FETCH_ERROR, + TALER_EC_MELT_DB_FETCH_ERROR, "failed to fetch old coin history"); return qs; } @@ -222,7 +222,7 @@ refresh_check_melt (struct MHD_Connection *connection, tl); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_MELT_COIN_EXPIRED_NO_ZOMBIE, + TALER_EC_MELT_COIN_EXPIRED_NO_ZOMBIE, "denomination expired"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -237,7 +237,7 @@ refresh_check_melt (struct MHD_Connection *connection, tl); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_COIN_HISTORY_COMPUTATION_FAILED, + TALER_EC_MELT_COIN_HISTORY_COMPUTATION_FAILED, "failed to compute coin transaction history"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -323,7 +323,7 @@ melt_transaction (void *cls, if (GNUNET_DB_STATUS_HARD_ERROR == qs) *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_DB_FETCH_ERROR, + TALER_EC_MELT_DB_FETCH_ERROR, "failed to fetch melt index"); return qs; } @@ -349,7 +349,7 @@ melt_transaction (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_DB_STORE_SESSION_ERROR, + TALER_EC_MELT_DB_STORE_SESSION_ERROR, "failed to persist melt data"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -398,7 +398,7 @@ handle_melt (struct MHD_Connection *connection, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_REFRESH_MELT_COIN_SIGNATURE_INVALID, + TALER_EC_MELT_COIN_SIGNATURE_INVALID, "confirm_sig"); } } @@ -491,7 +491,7 @@ check_for_denomination_key (struct MHD_Connection *connection, GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_MELT_DB_FETCH_ERROR, + TALER_EC_MELT_DB_FETCH_ERROR, "failed to find information about old coin"); } /* sanity check */ @@ -561,7 +561,7 @@ check_for_denomination_key (struct MHD_Connection *connection, TEH_KS_release (key_state); return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_REFRESH_MELT_DENOMINATION_SIGNATURE_INVALID, + TALER_EC_MELT_DENOMINATION_SIGNATURE_INVALID, "denom_sig"); } } @@ -593,7 +593,7 @@ check_for_denomination_key (struct MHD_Connection *connection, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_MELT_FEES_EXCEED_CONTRIBUTION, + TALER_EC_MELT_FEES_EXCEED_CONTRIBUTION, "melt amount smaller than melting fee"); } return handle_melt (connection, diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c index 377baaa1a..876797bab 100644 --- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c +++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c @@ -256,7 +256,7 @@ refreshes_reveal_preflight (void *cls, GNUNET_break (qs); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_DB_FETCH_REVEAL_ERROR, + TALER_EC_REVEAL_DB_FETCH_REVEAL_ERROR, "failed to fetch reveal data"); rctx->preflight_ok = GNUNET_SYSERR; return GNUNET_DB_STATUS_HARD_ERROR; @@ -308,7 +308,7 @@ refreshes_reveal_transaction (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_REFRESH_REVEAL_SESSION_UNKNOWN, + TALER_EC_REVEAL_SESSION_UNKNOWN, "rc"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -320,7 +320,7 @@ refreshes_reveal_transaction (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_DB_FETCH_SESSION_ERROR, + TALER_EC_REVEAL_DB_FETCH_SESSION_ERROR, "failed to fetch valid challenge from database"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -413,7 +413,7 @@ refreshes_reveal_transaction (void *cls, "hint", "commitment violation", "code", (json_int_t) - TALER_EC_REFRESH_REVEAL_COMMITMENT_VIOLATION, + TALER_EC_REVEAL_COMMITMENT_VIOLATION, "rc_expected", GNUNET_JSON_from_data_auto ( &rc_expected)); @@ -448,7 +448,7 @@ refreshes_reveal_transaction (void *cls, GNUNET_break_op (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_COST_CALCULATION_OVERFLOW, + TALER_EC_REVEAL_COST_CALCULATION_OVERFLOW, "failed to add up refresh costs"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -459,7 +459,7 @@ refreshes_reveal_transaction (void *cls, GNUNET_break_op (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_AMOUNT_INSUFFICIENT, + TALER_EC_REVEAL_AMOUNT_INSUFFICIENT, "melted coin value is insufficient to cover cost of operation"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -514,7 +514,7 @@ refreshes_reveal_persist (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_DB_COMMIT_ERROR, + TALER_EC_REVEAL_DB_COMMIT_ERROR, "failed to persist reveal data"); } return qs; @@ -626,13 +626,13 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state, case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: res = TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_REFRESH_REVEAL_SESSION_UNKNOWN, + TALER_EC_REVEAL_SESSION_UNKNOWN, "rc"); break; case GNUNET_DB_STATUS_HARD_ERROR: res = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_DB_FETCH_SESSION_ERROR, + TALER_EC_REVEAL_DB_FETCH_SESSION_ERROR, "failed to fetch session data"); break; case GNUNET_DB_STATUS_SOFT_ERROR: @@ -685,7 +685,7 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state, GNUNET_break_op (0); res = TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_REFRESH_REVEAL_LINK_SIGNATURE_INVALID, + TALER_EC_REVEAL_LINK_SIGNATURE_INVALID, "link_sig"); goto cleanup; } @@ -704,15 +704,15 @@ resolve_refreshes_reveal_denominations (struct TEH_KS_StateHandle *key_state, { rctx->ev_sigs[i].rsa_signature = GNUNET_CRYPTO_rsa_sign_blinded ( - rctx->dkis[i]->denom_priv.rsa_private_key, - rctx->rcds[i].coin_ev, - rctx->rcds[i].coin_ev_size); + rctx->dkis[i]->denom_priv.rsa_private_key, + rctx->rcds[i].coin_ev, + rctx->rcds[i].coin_ev_size); if (NULL == rctx->ev_sigs[i].rsa_signature) { GNUNET_break (0); res = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_SIGNING_ERROR, + TALER_EC_REVEAL_SIGNING_ERROR, "internal signing error"); goto cleanup; } @@ -827,7 +827,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE, + TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE, "new_denoms_h"); } @@ -837,7 +837,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH, + TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH, "new_denoms/coin_evs"); } if (json_array_size (new_denoms_h_json) != @@ -846,7 +846,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH, + TALER_EC_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISSMATCH, "new_denoms/link_sigs"); } @@ -878,7 +878,7 @@ handle_refreshes_reveal_json (struct MHD_Connection *connection, TALER_LOG_ERROR ("Lacking keys to operate\n"); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_REFRESH_REVEAL_KEYS_MISSING, + TALER_EC_REVEAL_KEYS_MISSING, "exchange lacks keys"); } ret = resolve_refreshes_reveal_denominations (key_state, @@ -941,7 +941,7 @@ TEH_handler_reveal (const struct TEH_RequestHandler *rh, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESHES_INVALID_RCH, + TALER_EC_REVEAL_INVALID_RCH, "refresh commitment hash malformed"); } if (0 != strcmp (args[1], @@ -975,7 +975,7 @@ TEH_handler_reveal (const struct TEH_RequestHandler *rh, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - TALER_EC_REFRESH_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID, + TALER_EC_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID, "transfer_privs"); } diff --git a/src/exchange/taler-exchange-httpd_transfers_get.c b/src/exchange/taler-exchange-httpd_transfers_get.c index 3c5b48994..9407ad791 100644 --- a/src/exchange/taler-exchange-httpd_transfers_get.c +++ b/src/exchange/taler-exchange-httpd_transfers_get.c @@ -445,7 +445,7 @@ get_transfer_deposits (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSFER_DB_FETCH_FAILED, + TALER_EC_TRANSFERS_GET_DB_FETCH_FAILED, "failed to fetch transaction data"); } return qs; @@ -455,7 +455,7 @@ get_transfer_deposits (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSFER_DB_INCONSISTENT, + TALER_EC_TRANSFERS_GET_DB_INCONSISTENT, "exchange database internally inconsistent"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -463,7 +463,7 @@ get_transfer_deposits (void *cls, { *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_TRACK_TRANSFER_WTID_NOT_FOUND, + TALER_EC_TRANSFERS_GET_WTID_NOT_FOUND, "wtid"); return GNUNET_DB_STATUS_HARD_ERROR; } @@ -484,7 +484,7 @@ get_transfer_deposits (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSFER_WIRE_FEE_NOT_FOUND, + TALER_EC_TRANSFERS_GET_WIRE_FEE_NOT_FOUND, "did not find wire fee"); } return qs; @@ -497,7 +497,7 @@ get_transfer_deposits (void *cls, GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_TRACK_TRANSFER_WIRE_FEE_INCONSISTENT, + TALER_EC_TRANSFERS_GET_WIRE_FEE_INCONSISTENT, "could not subtract wire fee"); return GNUNET_DB_STATUS_HARD_ERROR; } -- cgit v1.2.3