From 5f810ef8c790a3a39f0759b0ff39458db320bc43 Mon Sep 17 00:00:00 2001
From: Szczepan Zalega <szczepan@nitrokey.com>
Date: Sat, 23 Jul 2016 13:49:41 +0200
Subject: Set last command status

Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
---
 include/device_proto.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'include')

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
-- 
cgit v1.2.3