diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2019-01-15 16:00:18 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2019-01-15 16:00:18 +0100 |
commit | 0a359ceaa7cc08d5e7069729c0501931e0dbeb82 (patch) | |
tree | d516b24697bf84522fdbcabbdf72421ddcec386e /NK_C_API.cc | |
parent | e6628cff6e84fa5450304e7045909dc7ab71348c (diff) | |
parent | be6fd465ded13b4dd5b8ea10834a296efb8f1424 (diff) | |
download | libnitrokey-0a359ceaa7cc08d5e7069729c0501931e0dbeb82.tar.gz libnitrokey-0a359ceaa7cc08d5e7069729c0501931e0dbeb82.tar.bz2 |
Merge branch 'pr_143' into contributions
Return -2 if an error occured in NK_get_progress_bar_value
Fixes #143
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r-- | NK_C_API.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc index 7d0a10e..aa2d452 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -697,9 +697,9 @@ NK_C_API char* NK_get_SD_usage_data_as_string() { NK_C_API int NK_get_progress_bar_value() { auto m = NitrokeyManager::instance(); - return get_with_result([&]() { + return std::get<1>(get_with_status([&]() { return m->get_progress_bar_value(); - }); + }, -2)); } NK_C_API int NK_get_major_firmware_version() { |