aboutsummaryrefslogtreecommitdiff
path: root/device.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-13 19:15:18 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-13 19:15:18 +0100
commitac7c16d5f90f329a02b35b90f671823df360c2de (patch)
tree55c68f094e0704e8614f203b1e8c52b3ad347cb5 /device.cc
parent22d05ce647281056d71fbd3c31df3bcd6396188d (diff)
downloadlibnitrokey-ac7c16d5f90f329a02b35b90f671823df360c2de.tar.gz
libnitrokey-ac7c16d5f90f329a02b35b90f671823df360c2de.tar.bz2
Never call hid exit on OSX
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'device.cc')
-rw-r--r--device.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/device.cc b/device.cc
index 66877da..4cb492d 100644
--- a/device.cc
+++ b/device.cc
@@ -49,10 +49,12 @@ bool Device::_disconnect() {
hid_close(mp_devhandle);
mp_devhandle = nullptr;
+#ifndef __APPLE__
if (instances_count == 1){
LOG(std::string("Calling hid_exit"), Loglevel::DEBUG_L2);
hid_exit();
}
+#endif
return true;
}
@@ -204,4 +206,4 @@ std::string Device::ErrorCounters::get_as_string() {
p(receiving_error);
return ss.str();
}
-#undef p \ No newline at end of file
+#undef p