summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-17 19:32:12 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-17 19:32:12 +0100
commit2ce6c7a9d8fa5940049e0ea9f9f13b908ce6c7f8 (patch)
tree5140107a6808d6e0a75bdce68bf5584abf90612a /src/exchange/taler-exchange-httpd_refund.c
parentbf2cdc7ea2c48683b3d5a2433696dfe46cf19dbb (diff)
downloadexchange-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_refund.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refund.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_refund.c b/src/exchange/taler-exchange-httpd_refund.c
index 4effdb2c..dd701ebd 100644
--- a/src/exchange/taler-exchange-httpd_refund.c
+++ b/src/exchange/taler-exchange-httpd_refund.c
@@ -486,10 +486,10 @@ verify_and_execute_refund (struct MHD_Connection *connection,
}
{
- 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,
@@ -503,7 +503,7 @@ verify_and_execute_refund (struct MHD_Connection *connection,
unsigned int hc;
enum TALER_ErrorCode ec;
- dki = TEH_KS_denomination_key_lookup_by_hash (mks,
+ dki = TEH_KS_denomination_key_lookup_by_hash (key_state,
&denom_hash,
TEH_KS_DKU_DEPOSIT,
&ec,
@@ -513,7 +513,7 @@ verify_and_execute_refund (struct MHD_Connection *connection,
/* DKI not found, but we do have a coin with this DK in our database;
not good... */
GNUNET_break (0);
- TEH_KS_release (mks);
+ TEH_KS_release (key_state);
return TALER_MHD_reply_with_error (connection,
hc,
ec,
@@ -522,7 +522,7 @@ verify_and_execute_refund (struct MHD_Connection *connection,
TALER_amount_ntoh (&rc.expect_fee,
&dki->issue.properties.fee_refund);
}
- TEH_KS_release (mks);
+ TEH_KS_release (key_state);
}
/* Finally run the actual transaction logic */