merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit cf733c2b743b1e2d3c1e7a7d296aff71d70cf4e2
parent 794d43a336567dbafac442ca90071994b7fd9ada
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 12 Oct 2020 22:19:56 +0200

clarify comment

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-orders-ID.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -820,8 +820,13 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, gorc->sc.long_poll_timeout)); if (NULL != gorc->contract_terms) { - /* Clear old contract terms, might be from an earlier unclaimed contract - and thus could have changed during claiming. */ + /* Free memory filled with old contract terms before fetching the latest + ones from the DB. Note that we cannot simply skip the database + interaction as the contract terms loaded previously might be from an + earlier *unclaimed* order state (which we loaded in a previous + invocation of this function and we are back here due to long polling) + and thus the contract terms could have changed during claiming. Thus, + we need to fetch the latest contract terms from the DB again. */// json_decref (gorc->contract_terms); gorc->contract_terms = NULL; gorc->fulfillment_url = NULL;