aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_link.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-05 17:15:50 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-05 17:15:50 +0200
commitf3a4b00907410444055f47d4ff2074b44f981ad3 (patch)
treecb8f191a285152649e0b780aad8154f5b819f924 /src/lib/exchange_api_link.c
parent71916414069d18ec5b7d5901d52d62a2aaa1403d (diff)
downloadexchange-f3a4b00907410444055f47d4ff2074b44f981ad3.tar.xz
adapt to latest GNUnet API: GNUNET_JSON_spec_mark_optional() changed
Diffstat (limited to 'src/lib/exchange_api_link.c')
-rw-r--r--src/lib/exchange_api_link.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/exchange_api_link.c b/src/lib/exchange_api_link.c
index 5840cac63..ddc763c33 100644
--- a/src/lib/exchange_api_link.c
+++ b/src/lib/exchange_api_link.c
@@ -97,6 +97,7 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
union TALER_DenominationBlindingKeyP bks;
struct TALER_ExchangeWithdrawValues alg_values;
struct TALER_CsNonce nonce;
+ bool no_nonce;
uint32_t coin_idx;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_denom_pub ("denom_pub",
@@ -111,7 +112,8 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
&coin_idx),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_fixed_auto ("cs_nonce",
- &nonce)),
+ &nonce),
+ &no_nonce),
GNUNET_JSON_spec_end ()
};
struct TALER_TransferSecretP secret;
@@ -119,9 +121,6 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
struct TALER_CoinPubHashP c_hash;
/* parse reply */
- memset (&nonce,
- 0,
- sizeof (nonce));
if (GNUNET_OK !=
GNUNET_JSON_parse (json,
spec,
@@ -180,7 +179,7 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
}
if (TALER_DENOMINATION_CS == alg_values.cipher)
{
- if (GNUNET_is_zero (&nonce))
+ if (no_nonce)
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);