aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-23 13:49:41 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:56 +0200
commit5f810ef8c790a3a39f0759b0ff39458db320bc43 (patch)
tree064c059e35a765215c130fd5f50eef457f28dadc /include
parent587d24002711d905f95a8749694b15f5ca68656d (diff)
downloadlibnitrokey-5f810ef8c790a3a39f0759b0ff39458db320bc43.tar.gz
libnitrokey-5f810ef8c790a3a39f0759b0ff39458db320bc43.tar.bz2
Set last command status
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
-rw-r--r--include/device_proto.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/device_proto.h b/include/device_proto.h
index e05a303..79632d9 100644
--- a/include/device_proto.h
+++ b/include/device_proto.h
@@ -193,6 +193,8 @@ class Transaction : semantics::non_constructible {
int retry = dev.get_retry_count();
while (retry-- > 0) {
status = dev.recv(&resp);
+
+ dev.set_last_command_status(resp.last_command_status); // FIXME should be handled on device.recv
if (resp.device_status == 0) break;
Log::instance()("Device status is not ready (CRC error?) retrying..",
Loglevel::DEBUG); // FIXME translate device_status to log