summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-09-01 11:09:35 +0200
committerChristian Grothoff <christian@grothoff.org>2021-09-01 11:09:35 +0200
commit22798d2ec67b5078de805ac5a539a085c14ea693 (patch)
treede61bdd21496950b42dcbd7e789aeddef1f3bc8c
parente586a72a81ff00805df452014a36700998b5869d (diff)
downloadanastasis-22798d2ec67b5078de805ac5a539a085c14ea693.tar.gz
anastasis-22798d2ec67b5078de805ac5a539a085c14ea693.tar.bz2
anastasis-22798d2ec67b5078de805ac5a539a085c14ea693.zip
fix cmp
-rw-r--r--src/backend/anastasis-httpd_truth.c8
-rw-r--r--src/restclient/anastasis_api_keyshare_lookup.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/anastasis-httpd_truth.c b/src/backend/anastasis-httpd_truth.c
index 19f8b6b..50cd75b 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -1211,12 +1211,8 @@ AH_handler_truth_get (
if ( (is_question) ||
(! gc->authorization->payment_plugin_managed) )
{
- struct TALER_Amount zero_amount;
-
- TALER_amount_set_zero (AH_currency,
- &zero_amount);
- if (0 != TALER_amount_cmp (&gc->challenge_cost,
- &zero_amount))
+ if ( (0 == gc->challenge_cost.value) &&
+ (0 == gc->challenge_cost.fraction) )
{
/* Check database to see if the transaction is paid for */
enum GNUNET_DB_QueryStatus qs;
diff --git a/src/restclient/anastasis_api_keyshare_lookup.c b/src/restclient/anastasis_api_keyshare_lookup.c
index 5eeeee6..50e0d67 100644
--- a/src/restclient/anastasis_api_keyshare_lookup.c
+++ b/src/restclient/anastasis_api_keyshare_lookup.c
@@ -267,6 +267,12 @@ handle_keyshare_lookup_finished (void *cls,
data_size);
kdd.details.server_failure.http_status = response_code;
break;
+ case MHD_HTTP_BAD_GATEWAY:
+ kdd.status = ANASTASIS_KSD_SERVER_ERROR;
+ kdd.details.server_failure.ec = TALER_JSON_get_error_code2 (data,
+ data_size);
+ kdd.details.server_failure.http_status = response_code;
+ break;
default:
/* unexpected response code */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,