diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-05 10:00:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-05 10:19:25 +0200 |
commit | ac7ac406ce7337976d0c24f1fa6ee6b951ce941d (patch) | |
tree | b388585efb1390a4b443cc0cadbd3643326f4a1c /include | |
parent | 7c68a2d027da456d1fc92c67c98bee77ffdc5097 (diff) | |
download | libnitrokey-ac7ac406ce7337976d0c24f1fa6ee6b951ce941d.tar.gz libnitrokey-ac7ac406ce7337976d0c24f1fa6ee6b951ce941d.tar.bz2 |
Clear last command status on the device when checked
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/device.h b/include/device.h index a27c019..0553d2e 100644 --- a/include/device.h +++ b/include/device.h @@ -50,7 +50,7 @@ public: std::chrono::milliseconds get_retry_timeout() const { return m_retry_timeout; }; std::chrono::milliseconds get_send_receive_delay() const {return m_send_receive_delay;} - int get_last_command_status() const {return last_command_status;}; + int get_last_command_status() {auto a = last_command_status; last_command_status = 0; return a;}; void set_last_command_status(uint8_t _err) { last_command_status = _err;} ; bool last_command_sucessfull() const {return last_command_status == 0;}; DeviceModel get_device_model() const {return m_model;} |