diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-14 15:17:11 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-14 15:17:11 +0200 |
commit | 458d1ac531f52e7802e054bfd151631af4d9d6e0 (patch) | |
tree | da08479965817d153994a5aad662879e63efa62d /src/lib/merchant_api_get_reserves.c | |
parent | 573a2270a09266199ac0062b18b2aacab13a8c59 (diff) | |
download | merchant-458d1ac531f52e7802e054bfd151631af4d9d6e0.tar.gz merchant-458d1ac531f52e7802e054bfd151631af4d9d6e0.tar.bz2 merchant-458d1ac531f52e7802e054bfd151631af4d9d6e0.zip |
clean up logic: use new EXCHANGE_YNA enum, avoid crazy macro construction to build URLs, use full power of TALER_url_join() instead
Diffstat (limited to 'src/lib/merchant_api_get_reserves.c')
-rw-r--r-- | src/lib/merchant_api_get_reserves.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/merchant_api_get_reserves.c b/src/lib/merchant_api_get_reserves.c index 102d4335..017dcd9c 100644 --- a/src/lib/merchant_api_get_reserves.c +++ b/src/lib/merchant_api_get_reserves.c @@ -226,8 +226,8 @@ struct TALER_MERCHANT_ReservesGetHandle * TALER_MERCHANT_reserves_get (struct GNUNET_CURL_Context *ctx, const char *backend_url, struct GNUNET_TIME_Absolute after, - enum TALER_MERCHANT_YesNoAll active, - enum TALER_MERCHANT_YesNoAll failures, + enum TALER_EXCHANGE_YesNoAll active, + enum TALER_EXCHANGE_YesNoAll failures, TALER_MERCHANT_ReservesGetCallback cb, void *cb_cls) { @@ -241,15 +241,10 @@ TALER_MERCHANT_reserves_get (struct GNUNET_CURL_Context *ctx, rgh->ctx = ctx; rgh->cb = cb; rgh->cb_cls = cb_cls; - if (TALER_MERCHANT_YNA_YES == active) - active_s = "yes"; - if (TALER_MERCHANT_YNA_NO == active) - active_s = "no"; - if (TALER_MERCHANT_YNA_YES == failures) - failures_s = "yes"; - if (TALER_MERCHANT_YNA_NO == failures) - failures_s = "no"; - after_s = GNUNET_strdup (GNUNET_STRINGS_absolute_time_to_string (after)); + active_s = TALER_yna_to_string (active); + failures_s = TALER_yna_to_string (failures); + after_s = GNUNET_strdup (GNUNET_STRINGS_absolute_time_to_string ( + after)); rgh->url = TALER_url_join (backend_url, "reserves", "active", |