[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: TODO -> FIXME
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: TODO -> FIXME |
Date: |
Wed, 01 Jan 2025 14:03:19 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 8c90b0d0 TODO -> FIXME
8c90b0d0 is described below
commit 8c90b0d096cd5c2dc5bdee899766fa6b0a9ba85c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jan 1 14:03:15 2025 +0100
TODO -> FIXME
---
src/backend/taler-merchant-httpd.c | 7 +------
src/backend/taler-merchant-httpd_post-orders-ID-pay.c | 8 ++++----
src/backend/taler-merchant-httpd_private-get-orders-ID.c | 15 +++++++++------
src/backend/taler-merchant-httpd_private-post-orders.c | 2 --
src/backenddb/pg_insert_issued_token.c | 15 ++++++++-------
src/backenddb/pg_insert_spent_token.c | 4 ++--
src/backenddb/pg_lookup_contract_terms3.c | 4 ++--
src/testing/testing_api_cmd_pay_order.c | 6 +++---
8 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index 2a4bcf25..12b7b9d8 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -505,7 +505,7 @@ handle_mhd_completion_callback (void *cls,
json_decref (hc->request_body);
if (NULL != hc->instance)
TMH_instance_decref (hc->instance);
- TMH_db->preflight(TMH_db->cls);
+ TMH_db->preflight (TMH_db->cls);
GNUNET_free (hc->full_url);
GNUNET_free (hc);
*con_cls = NULL;
@@ -2273,11 +2273,6 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
-
- /* TODO: Load config variables for merchant token family
- cipher type "rsa" or "cs" and key size.
- Defaults to "rsa" and 2048 bits. */
-
if (GNUNET_OK !=
TALER_CONFIG_parse_currencies (cfg,
TMH_currency,
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index c8bc793b..605007e9 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -2862,7 +2862,7 @@ phase_validate_tokens (struct PayContext *pc)
sign_token_envelopes (pc,
key,
&details.priv,
- /* TODO: Use critical field stored in
database here instead. */
+ /* FIXME: Use critical field stored in
database here instead. */
details.token_family.kind ==
TALER_MERCHANTDB_TFK_Subscription,
i,
@@ -3027,7 +3027,7 @@ phase_contract_paid (struct PayContext *pc)
{
enum GNUNET_DB_QueryStatus qs;
- /* TODO: Use h_contract instead of order_serial here? */
+ /* FIXME: Use h_contract instead of order_serial here? */
qs = TMH_db->lookup_spent_tokens_by_order (TMH_db->cls,
pc->order_serial,
&input_tokens_paid_check,
@@ -3063,7 +3063,7 @@ phase_contract_paid (struct PayContext *pc)
TALER_merchant_pay_sign (&pc->h_contract_terms,
&pc->hc->instance->merchant_priv,
&sig);
- /* TODO: Add token_sigs to response body. */
+ /* FIXME: Add token_sigs to response body. */
pay_end (pc,
TALER_MHD_REPLY_JSON_PACK (
pc->connection,
@@ -3073,7 +3073,7 @@ phase_contract_paid (struct PayContext *pc)
return;
}
/* Conflict, double-payment detected! */
- /* TODO: What should we do with input tokens?
+ /* FIXME: What should we do with input tokens?
Currently there is no refund for tokens. */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Client attempted to pay extra for already paid order `%s'\n",
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index dc3328d4..df18542c 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -619,7 +619,6 @@ phase_fetch_contract (struct GetOrderRequestContext *gorc)
gorc->order_only = false;
}
TMH_db->preflight (TMH_db->cls);
- /* TODO: Check if choice_index is actually set to NULL if not in db. */
qs = TMH_db->lookup_contract_terms3 (TMH_db->cls,
hc->instance->settings.id,
hc->infix,
@@ -1387,7 +1386,7 @@ phase_reply_result (struct GetOrderRequestContext *gorc)
struct TMH_HandlerContext *hc = gorc->hc;
MHD_RESULT ret;
char *order_status_url;
- json_t *choice_index = json_null ();
+ json_t *choice_index;
{
struct TALER_PrivateContractHashP *h_contract = NULL;
@@ -1422,6 +1421,10 @@ phase_reply_result (struct GetOrderRequestContext *gorc)
gorc->choice_index);
choice_index = json_integer ((json_int_t) gorc->choice_index);
}
+ else
+ {
+ choice_index = NULL;
+ }
ret = TALER_MHD_REPLY_JSON_PACK (
gorc->sc.con,
MHD_HTTP_OK,
@@ -1460,10 +1463,10 @@ phase_reply_result (struct GetOrderRequestContext *gorc)
gorc->refund_details),
GNUNET_JSON_pack_string ("order_status_url",
order_status_url),
- {
- .field_name = "choice_index",
- .object = choice_index,
- });
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_object_steal (
+ "choice_index",
+ choice_index)));
GNUNET_free (order_status_url);
gorc->wire_details = NULL;
gorc->refund_details = NULL;
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index e21ab2c8..d255fcf1 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -633,7 +633,6 @@ struct OrderContext
ORDER_PHASE_PARSE_ORDER,
ORDER_PHASE_PARSE_CHOICES,
#ifdef HAVE_DONAU_DONAU_SERVICE_H
- // TODO: PLACE HOLDER FOR THE PARSE DONAU INSTANCES, maybe it needs to be
lower in the order
ORDER_PHASE_PARSE_DONAU,
#endif
ORDER_PHASE_MERGE_INVENTORY,
@@ -4179,7 +4178,6 @@ TMH_private_post_orders (
parse_choices (oc);
break;
#ifdef HAVE_DONAU_DONAU_SERVICE_H
- // TODO: PLACE HOLDER FOR THE PARSE DONAU INSTANCES, maybe it needs to be
lower in the order
case ORDER_PHASE_PARSE_DONAU:
parse_donau_instances (oc);
break;
diff --git a/src/backenddb/pg_insert_issued_token.c
b/src/backenddb/pg_insert_issued_token.c
index 097f4f85..bc66bd01 100644
--- a/src/backenddb/pg_insert_issued_token.c
+++ b/src/backenddb/pg_insert_issued_token.c
@@ -27,9 +27,12 @@
enum GNUNET_DB_QueryStatus
TMH_PG_insert_issued_token (void *cls,
- const struct TALER_PrivateContractHashP
*h_contract_terms,
- const struct TALER_TokenIssuePublicKeyHashP
*h_issue_pub,
- const struct TALER_BlindedTokenIssueSignature
*blind_sig)
+ const struct TALER_PrivateContractHashP *
+ h_contract_terms,
+ const struct TALER_TokenIssuePublicKeyHashP *
+ h_issue_pub,
+ const struct TALER_BlindedTokenIssueSignature *
+ blind_sig)
{
struct PostgresClosure *pg = cls;
@@ -53,10 +56,8 @@ TMH_PG_insert_issued_token (void *cls,
" USING (token_family_serial)"
" WHERE h_pub = $1");
- /* TODO: Increase issued counter on merchant_token_family table. */
+ /* FIXME-#9434: Increase issued counter on merchant_token_family table. */
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"issued_token_insert",
params);
-
-
-}
\ No newline at end of file
+}
diff --git a/src/backenddb/pg_insert_spent_token.c
b/src/backenddb/pg_insert_spent_token.c
index 0cf7efb9..9d533a9e 100644
--- a/src/backenddb/pg_insert_spent_token.c
+++ b/src/backenddb/pg_insert_spent_token.c
@@ -49,7 +49,7 @@ TMH_PG_insert_spent_token (
PREPARE (pg,
"spent_token_insert",
"INSERT INTO merchant_used_tokens"
- "(merchant_serial" /* TODO: Remove merchant_serial field from the
db, it's already given by token_family.merchant_serial. */
+ "(merchant_serial" /* FIXME-#9434: Remove merchant_serial field
from the db, it's already given by token_family.merchant_serial. */
",token_family_key_serial"
",h_contract_terms"
",token_pub"
@@ -61,7 +61,7 @@ TMH_PG_insert_spent_token (
" USING (token_family_serial)"
" WHERE h_pub = $1");
- /* TODO: Increase used counter on merchant_token_family table. */
+ /* FIXME-#9434: Increase used counter on merchant_token_family table. */
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"spent_token_insert",
params);
diff --git a/src/backenddb/pg_lookup_contract_terms3.c
b/src/backenddb/pg_lookup_contract_terms3.c
index 4c6fd477..efe23441 100644
--- a/src/backenddb/pg_lookup_contract_terms3.c
+++ b/src/backenddb/pg_lookup_contract_terms3.c
@@ -45,7 +45,7 @@ TMH_PG_lookup_contract_terms3 (
struct PostgresClosure *pg = cls;
enum GNUNET_DB_QueryStatus qs;
struct TALER_ClaimTokenP ct;
- uint16_t ci;
+ uint16_t ci = 0;
bool choice_index_null = false;
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_string (instance_id),
@@ -105,7 +105,7 @@ TMH_PG_lookup_contract_terms3 (
if (NULL != claim_token)
*claim_token = ct;
if (! choice_index_null)
- *choice_index = ci;
+ *choice_index = (int16_t) ci;
else
*choice_index = -1;
return qs;
diff --git a/src/testing/testing_api_cmd_pay_order.c
b/src/testing/testing_api_cmd_pay_order.c
index 67ea3fdd..17d5cee5 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -261,7 +261,7 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
/* Token syntax is "LABEL[/NUMBER]" */
ctok = strchr (token, '/');
- // TODO: Check why ci variable is parsed but not used?
+ /* FIXME: Check why ci variable is parsed but not used? */
ci = 0;
if (NULL != ctok)
{
@@ -813,7 +813,7 @@ pay_run (void *cls,
TALER_token_blind_input_copy (&details->blinding_inputs,
TALER_token_blind_input_rsa_singleton ()
);
- /* TODO: Where to get details->blinding_inputs from? */
+ /* FIXME: Where to get details->blinding_inputs from? */
TALER_token_use_setup_random (&details->master);
TALER_token_use_setup_priv (&details->master,
&details->blinding_inputs,
@@ -831,7 +831,7 @@ pay_run (void *cls,
(
details->issue_pub.public_key,
&details->blinding_secret,
- NULL, /* TODO: Add session nonce to support CS tokens */
+ NULL, /* FIXME: Add session nonce to support CS tokens */
&details->h_token_pub.hash,
sizeof (details->h_token_pub.hash),
details->blinding_inputs.blinding_inputs);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: TODO -> FIXME,
gnunet <=