mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Make the AES availability cache actually cache things!
Ahem. I went to all the effort of setting up a wrapper function that would store the result of the first call to aes_hw_available(), and managed to forget to make it set the flag that said it _had_ stored the result. So the underlying query function was being called every time.
This commit is contained in:
parent
85633ac4bd
commit
5ac7cdb1cb
4
sshaes.c
4
sshaes.c
@ -134,8 +134,10 @@ static bool aes_hw_available_cached(void)
|
|||||||
{
|
{
|
||||||
static bool initialised = false;
|
static bool initialised = false;
|
||||||
static bool hw_available;
|
static bool hw_available;
|
||||||
if (!initialised)
|
if (!initialised) {
|
||||||
hw_available = aes_hw_available();
|
hw_available = aes_hw_available();
|
||||||
|
initialised = true;
|
||||||
|
}
|
||||||
return hw_available;
|
return hw_available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user