diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-05-21 00:20:15 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2018-05-21 00:20:15 +0200 |
commit | 5910ec72e0f7abd3f6c876e04a07057b0dd8edaa (patch) | |
tree | 9abd26e214e740eb21e58b97c87e780e7aac4cba /unittest/test_multiple_devices.cc | |
parent | e91e21d5aa6c885fcb0c04ea130c93b72ce9a92b (diff) | |
download | libnitrokey-5910ec72e0f7abd3f6c876e04a07057b0dd8edaa.tar.gz libnitrokey-5910ec72e0f7abd3f6c876e04a07057b0dd8edaa.tar.bz2 |
Correct return value for NitrokeyManager::connect()
NitrokeyManager::connect() currently returns true if the device pointer
is set. Yet this does not mean that the connection was successful. For
example, NitrokeyManger::connect(const char*) sets the device pointer
even if it was not successful.
This patch introduces a variable that keeps track of the connection
instead of checking the device pointer. This corrects the return value
without changing the behavior of the connect method (returning the
Storage device if both a Pro and a Storage device are present).
Diffstat (limited to 'unittest/test_multiple_devices.cc')
0 files changed, 0 insertions, 0 deletions