diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-28 14:36:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:58 +0200 |
commit | debee8aa477fbec7c1c23d5dec565de11241f814 (patch) | |
tree | 4e95f150e8936f09c941792c226b625da20f7fcb /device.cc | |
parent | 349b7b65583ec2366511823b0c0f3bac3c23d642 (diff) | |
download | libnitrokey-debee8aa477fbec7c1c23d5dec565de11241f814.tar.gz libnitrokey-debee8aa477fbec7c1c23d5dec565de11241f814.tar.bz2 |
Use int instead of CommError
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'device.cc')
-rw-r--r-- | device.cc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,17 +34,17 @@ bool Device::connect() { return mp_devhandle != NULL; } -CommError Device::send(const void *packet) { +int Device::send(const void *packet) { Log::instance()(__PRETTY_FUNCTION__, Loglevel::DEBUG_L2); if (mp_devhandle == NULL) throw std::runtime_error("Attempted HID send on an invalid descriptor."); - return (CommError)(hid_send_feature_report( + return (hid_send_feature_report( mp_devhandle, (const unsigned char *)(packet), HID_REPORT_SIZE)); } -CommError Device::recv(void *packet) { +int Device::recv(void *packet) { // FIXME change CommError return value to int (return value of // hid_get_feature_report) int status; @@ -80,7 +80,7 @@ CommError Device::recv(void *packet) { std::this_thread::sleep_for(m_retry_timeout); } - return (CommError)status; + return status; } Stick10::Stick10() { |