summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refreshes_reveal.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/exchange/taler-exchange-httpd_refreshes_reveal.c
parent71916414069d18ec5b7d5901d52d62a2aaa1403d (diff)
downloadexchange-f3a4b00907410444055f47d4ff2074b44f981ad3.tar.gz
exchange-f3a4b00907410444055f47d4ff2074b44f981ad3.tar.bz2
exchange-f3a4b00907410444055f47d4ff2074b44f981ad3.zip
adapt to latest GNUnet API: GNUNET_JSON_spec_mark_optional() changed
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refreshes_reveal.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refreshes_reveal.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
index e1cf6ab2c..8a5d8a802 100644
--- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
@@ -132,9 +132,9 @@ struct RevealContext
unsigned int num_fresh_coins;
/**
- * True if @e rms was provided.
+ * True if @e rms was not provided.
*/
- bool have_rms;
+ bool no_rms;
};
@@ -337,9 +337,9 @@ check_commitment (struct RevealContext *rctx,
}
TALER_refresh_get_commitment (&rc_expected,
TALER_CNC_KAPPA,
- rctx->have_rms
- ? &rctx->rms
- : NULL,
+ rctx->no_rms
+ ? NULL
+ : &rctx->rms,
rctx->num_fresh_coins,
rcs,
&rctx->melt.session.coin.coin_pub,
@@ -484,7 +484,7 @@ resolve_refreshes_reveal_denominations (struct MHD_Connection *connection,
if (NULL == dks[i])
return ret;
if ( (TALER_DENOMINATION_CS == dks[i]->denom_pub.cipher) &&
- (! rctx->have_rms) )
+ (rctx->no_rms) )
{
return TALER_MHD_reply_with_error (
connection,
@@ -937,10 +937,12 @@ TEH_handler_reveal (struct TEH_RequestContext *rc,
&new_denoms_h),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_json ("old_age_commitment",
- &old_age_commitment)),
+ &old_age_commitment),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_fixed_auto ("rms",
- &rctx.rms)),
+ &rctx.rms),
+ &rctx.no_rms),
GNUNET_JSON_spec_end ()
};
@@ -981,8 +983,6 @@ TEH_handler_reveal (struct TEH_RequestContext *rc,
return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES;
}
}
- rctx.have_rms = (NULL != json_object_get (root,
- "rms"));
/* Check we got enough transfer private keys */
/* Note we do +1 as 1 row (cut-and-choose!) is missing! */