diff options
Diffstat (limited to 'src/backend/anastasis-httpd_truth-challenge.c')
-rw-r--r-- | src/backend/anastasis-httpd_truth-challenge.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/anastasis-httpd_truth-challenge.c b/src/backend/anastasis-httpd_truth-challenge.c index 3a3688e..b03c883 100644 --- a/src/backend/anastasis-httpd_truth-challenge.c +++ b/src/backend/anastasis-httpd_truth-challenge.c @@ -156,9 +156,9 @@ struct ChallengeContext unsigned int response_code; /** - * true if client provided a payment secret / order ID? + * true if client did not provide a payment secret / order ID. */ - bool payment_identifier_provided; + bool no_payment_identifier_provided; /** * True if this entry is in the #gc_head DLL. @@ -921,7 +921,7 @@ run_authorization_process (struct MHD_Connection *connection, gc->as = NULL; return MHD_YES; case ANASTASIS_AUTHORIZATION_CRES_FAILED: - if (gc->payment_identifier_provided) + if (! gc->no_payment_identifier_provided) { begin_refund (gc); } @@ -1042,7 +1042,8 @@ AH_handler_truth_challenge ( &gc->truth_key), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_fixed_auto ("payment_secret", - &gc->payment_identifier)), + &gc->payment_identifier), + &gc->no_payment_identifier_provided), GNUNET_JSON_spec_end () }; enum GNUNET_GenericReturnValue res; @@ -1060,9 +1061,7 @@ AH_handler_truth_challenge ( GNUNET_break_op (0); return MHD_YES; /* failure */ } - gc->payment_identifier_provided - = ! GNUNET_is_zero (&gc->payment_identifier); - if (gc->payment_identifier_provided) + if (! gc->no_payment_identifier_provided) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Client provided payment identifier `%s'\n", TALER_B2S (&gc->payment_identifier)); @@ -1156,7 +1155,7 @@ AH_handler_truth_challenge ( enum GNUNET_DB_QueryStatus qs; bool paid; - if (! gc->payment_identifier_provided) + if (gc->no_payment_identifier_provided) { GNUNET_free (truth_mime); GNUNET_free (encrypted_truth); |