diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-01-17 19:32:12 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-01-17 19:32:12 +0100 |
commit | 2ce6c7a9d8fa5940049e0ea9f9f13b908ce6c7f8 (patch) | |
tree | 5140107a6808d6e0a75bdce68bf5584abf90612a /src/exchange/taler-exchange-httpd_deposit.c | |
parent | bf2cdc7ea2c48683b3d5a2433696dfe46cf19dbb (diff) | |
download | exchange-2ce6c7a9d8fa5940049e0ea9f9f13b908ce6c7f8.tar.gz exchange-2ce6c7a9d8fa5940049e0ea9f9f13b908ce6c7f8.tar.bz2 exchange-2ce6c7a9d8fa5940049e0ea9f9f13b908ce6c7f8.zip |
more KS cleanups, including one race fix
Diffstat (limited to 'src/exchange/taler-exchange-httpd_deposit.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_deposit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 0e4e0b26c..7dc22fd53 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -288,10 +288,10 @@ verify_and_execute_deposit (struct MHD_Connection *connection, /* check denomination */ { - struct TEH_KS_StateHandle *mks; + struct TEH_KS_StateHandle *key_state; - mks = TEH_KS_acquire (GNUNET_TIME_absolute_get ()); - if (NULL == mks) + key_state = TEH_KS_acquire (GNUNET_TIME_absolute_get ()); + if (NULL == key_state) { TALER_LOG_ERROR ("Lacking keys to operate\n"); return TALER_MHD_reply_with_error (connection, @@ -299,14 +299,14 @@ verify_and_execute_deposit (struct MHD_Connection *connection, TALER_EC_EXCHANGE_BAD_CONFIGURATION, "no keys"); } - dki = TEH_KS_denomination_key_lookup_by_hash (mks, + dki = TEH_KS_denomination_key_lookup_by_hash (key_state, &deposit->coin.denom_pub_hash, TEH_KS_DKU_DEPOSIT, &ec, &hc); if (NULL == dki) { - TEH_KS_release (mks); + TEH_KS_release (key_state); return TALER_MHD_reply_with_error (connection, hc, ec, @@ -314,7 +314,7 @@ verify_and_execute_deposit (struct MHD_Connection *connection, } TALER_amount_ntoh (&dc.value, &dki->issue.properties.value); - TEH_KS_release (mks); + TEH_KS_release (key_state); } /* execute transaction */ dc.deposit = deposit; |