summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_reserves_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_reserves_open.c')
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_open.c50
1 files changed, 6 insertions, 44 deletions
diff --git a/src/exchange/taler-exchange-httpd_reserves_open.c b/src/exchange/taler-exchange-httpd_reserves_open.c
index 160814b65..2bc450ee2 100644
--- a/src/exchange/taler-exchange-httpd_reserves_open.c
+++ b/src/exchange/taler-exchange-httpd_reserves_open.c
@@ -163,51 +163,13 @@ reserve_open_transaction (void *cls,
(void) rsc;
#if 0
- if (! TALER_amount_is_zero (&rsc->gf->fees.open))
- {
- bool balance_ok = false;
- bool idempotent = true;
-
- qs = TEH_plugin->insert_open_request (TEH_plugin->cls,
- rsc->reserve_pub,
- &rsc->reserve_sig,
- rsc->timestamp,
- &rsc->gf->fees.open,
- &balance_ok,
- &idempotent);
- if (GNUNET_DB_STATUS_HARD_ERROR == qs)
- {
- GNUNET_break (0);
- *mhd_ret
- = TALER_MHD_reply_with_error (connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_FETCH_FAILED,
- "get_reserve_open");
- }
- if (qs <= 0)
- {
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
- return qs;
- }
- if (! balance_ok)
- {
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_CONFLICT,
- TALER_EC_EXCHANGE_WITHDRAW_OPEN_ERROR_INSUFFICIENT_FUNDS,
- NULL);
- }
- if (idempotent)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Idempotent /reserves/open request observed. Is caching working?\n");
- }
- }
- qs = TEH_plugin->get_reserve_open (TEH_plugin->cls,
- rsc->reserve_pub,
- &rsc->balance,
- &rsc->rh);
-#endif
+ // FIXME: implement!
+ qs = TEH_plugin->do_reserve_open (TEH_plugin->cls,
+ rsc->reserve_pub,
+ ...);
+#else
qs = GNUNET_DB_STATUS_HARD_ERROR;
+#endif
switch (qs)
{
case GNUNET_DB_STATUS_HARD_ERROR: