From 49ea52c45eee26be51df4969ca2af8c2b7c9ceb6 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 23 Jul 2016 15:03:42 +0200 Subject: Handling device errors through exceptions Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'NitrokeyManager.cc') diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 39f1cff..e2dfa9d 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -115,11 +115,9 @@ namespace nitrokey{ strcpy((char *) (auth.temporary_password), temporary_password); auth.crc_to_authorize = WriteToHOTPSlot::CommandTransaction::getCRC(payload); Authorize::CommandTransaction::run(*device, auth); - auto auth_successful = device->last_command_sucessfull(); auto resp = WriteToHOTPSlot::CommandTransaction::run(*device, payload); - auto write_successful = device->last_command_sucessfull(); - return auth_successful && write_successful; + return true; } enum totp_config{digits8=0, enter=1, tokenID=2}; -- cgit v1.2.1