diff options
| author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-19 09:05:25 +0200 | 
|---|---|---|
| committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-19 16:40:25 +0200 | 
| commit | 7d579ca0ca59095596275f7b891dacce54398f1f (patch) | |
| tree | 0741173939440090109754d9b65c3bb0b0666305 /include | |
| parent | b53d6455d1c7dfd24ec2cbb18d5e943c0472d34e (diff) | |
| download | libnitrokey-7d579ca0ca59095596275f7b891dacce54398f1f.tar.gz libnitrokey-7d579ca0ca59095596275f7b891dacce54398f1f.tar.bz2 | |
Add all devices' and commands' statuses
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/command_id.h | 13 | ||||
| -rw-r--r-- | include/device_proto.h | 2 | 
2 files changed, 13 insertions, 2 deletions
| diff --git a/include/command_id.h b/include/command_id.h index 093de1f..8148cc1 100644 --- a/include/command_id.h +++ b/include/command_id.h @@ -22,11 +22,22 @@ namespace proto {      namespace stick10 {        enum class command_status : uint8_t {            ok = 0, +          wrong_CRC, +          wrong_slot, +          slot_not_programmed, +          wrong_password  = 4, +          not_authorized, +          timestamp_warning, +          no_name_error, +          not_supported, +          unknown_command, +          AES_dec_failed        };        enum class device_status : uint8_t {          ok = 0,          busy = 1, -        wrong_password  = 4, +        error, +        received_report,        };      } diff --git a/include/device_proto.h b/include/device_proto.h index 6b06a16..45f165b 100644 --- a/include/device_proto.h +++ b/include/device_proto.h @@ -251,7 +251,7 @@ namespace nitrokey {                          resp.device_status = static_cast<uint8_t>(stick10::device_status::busy);                          break;                        case stick20::device_status::wrong_password: -                        resp.last_command_status = static_cast<uint8_t>(stick10::device_status::wrong_password); +                        resp.last_command_status = static_cast<uint8_t>(stick10::command_status::wrong_password);                          resp.device_status = static_cast<uint8_t>(stick10::device_status::ok);                          break;                        default: | 
