diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-13 16:56:44 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-13 16:56:44 +0200 |
commit | ba97d2efd73bd004bc3d1b0bf76e32e17e739144 (patch) | |
tree | ed54080aa4a167541866fbcb2d8eb7538b25b9c2 /NitrokeyManager.cc | |
parent | 10631378c61b7ce54ad6f31dc1d16c3ba4c49d32 (diff) | |
download | libnitrokey-ba97d2efd73bd004bc3d1b0bf76e32e17e739144.tar.gz libnitrokey-ba97d2efd73bd004bc3d1b0bf76e32e17e739144.tar.bz2 |
NK Storage: update counters before getting
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r-- | NitrokeyManager.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index d827292..ac6ce77 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -312,10 +312,16 @@ namespace nitrokey{ } uint8_t NitrokeyManager::get_user_retry_count() { + if(device->get_device_model() == DeviceModel::STORAGE){ + stick20::GetDeviceStatus::CommandTransaction::run(*device); + } auto response = GetUserPasswordRetryCount::CommandTransaction::run(*device); return response.data().password_retry_count; } uint8_t NitrokeyManager::get_admin_retry_count() { + if(device->get_device_model() == DeviceModel::STORAGE){ + stick20::GetDeviceStatus::CommandTransaction::run(*device); + } auto response = GetPasswordRetryCount::CommandTransaction::run(*device); return response.data().password_retry_count; } |