diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-05-01 00:09:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-05-01 00:09:55 +0200 |
commit | 583c01c6224dd317f9665e623b02a32b74fdf74a (patch) | |
tree | 0b12e40c9dafde2b235c3c405a1ee032ff0e70d4 /src/backend/taler-merchant-httpd_post-tips-ID-pickup.c | |
parent | a7fe1d1b77ce1d7959522262f85788807d56316b (diff) | |
download | merchant-583c01c6224dd317f9665e623b02a32b74fdf74a.tar.gz merchant-583c01c6224dd317f9665e623b02a32b74fdf74a.tar.bz2 merchant-583c01c6224dd317f9665e623b02a32b74fdf74a.zip |
first rough cut at merchant update for #7810 (still with known bugs)
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-tips-ID-pickup.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_post-tips-ID-pickup.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c index 24bbba35..fb560de6 100644 --- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c +++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c @@ -309,15 +309,14 @@ TMH_force_tip_pickup_resume () * planchet operation, resume HTTP processing. * * @param cls closure with a `struct PlanchetOperation *` - * @param hr HTTP response data - * @param blind_sig blind signature over the coin, NULL on error + * @param w2r response data */ static void withdraw_cb (void *cls, - const struct TALER_EXCHANGE_HttpResponse *hr, - const struct TALER_BlindedDenominationSignature *blind_sig) + const struct TALER_EXCHANGE_Withdraw2Response *w2r) { struct PlanchetOperation *po = cls; + const struct TALER_EXCHANGE_HttpResponse *hr = &w2r->hr; struct PickupContext *pc = po->pc; enum GNUNET_DB_QueryStatus qs; @@ -325,7 +324,7 @@ withdraw_cb (void *cls, pc->po_tail, po); TMH_db->preflight (TMH_db->cls); - if (NULL == blind_sig) + if (MHD_HTTP_OK != hr->http_status) { GNUNET_free (po); stop_operations (pc); @@ -344,7 +343,7 @@ withdraw_cb (void *cls, qs = TMH_db->insert_pickup_blind_signature (TMH_db->cls, &pc->pickup_id, po->offset, - blind_sig); + &w2r->details.ok.blind_sig); GNUNET_free (po); if (qs < 0) { @@ -380,16 +379,12 @@ withdraw_cb (void *cls, * @param cls closure, with our `struct PlanchetOperation *` * @param hr HTTP response details * @param eh handle to the exchange context - * @param payto_uri payto://-URI of the exchange - * @param wire_fee current applicable wire fee for dealing with @a eh, NULL if not available * @param exchange_trusted true if this exchange is trusted by config */ static void do_withdraw (void *cls, const struct TALER_EXCHANGE_HttpResponse *hr, struct TALER_EXCHANGE_Handle *eh, - const char *payto_uri, - const struct TALER_Amount *wire_fee, bool exchange_trusted) { struct PlanchetOperation *po = cls; @@ -463,8 +458,7 @@ try_withdraw (struct PickupContext *pc, po->pd = *planchet; po->offset = offset; po->fo = TMH_EXCHANGES_find_exchange (exchange_url, - NULL, - GNUNET_NO, + false, &do_withdraw, po); GNUNET_assert (NULL != po->fo); @@ -507,16 +501,12 @@ do_timeout (void *cls) * @param cls closure, with our `struct PickupContext *` * @param hr HTTP response details * @param eh handle to the exchange context - * @param payto_uri payto://-URI of the exchange - * @param wire_fee current applicable wire fee for dealing with @a eh, NULL if not available * @param exchange_trusted true if this exchange is trusted by config */ static void compute_total_requested (void *cls, const struct TALER_EXCHANGE_HttpResponse *hr, struct TALER_EXCHANGE_Handle *eh, - const char *payto_uri, - const struct TALER_Amount *wire_fee, bool exchange_trusted) { struct PickupContext *pc = cls; @@ -796,8 +786,7 @@ TMH_post_tips_ID_pickup (const struct TMH_RequestHandler *rh, &do_timeout, pc); pc->fo = TMH_EXCHANGES_find_exchange (exchange_url, - NULL, - GNUNET_NO, + false, &compute_total_requested, pc); GNUNET_free (exchange_url); |