diff options
author | Marc Schink <jaylink-dev@marcschink.de> | 2016-04-10 19:19:03 +0100 |
---|---|---|
committer | Marc Schink <jaylink-dev@marcschink.de> | 2016-04-11 00:22:06 +0200 |
commit | 356f801cdd733737cf09ad6a3765ebdc9ee9f4bb (patch) | |
tree | 706f4bf38756fe48347146b7ed16e8e0a2f3753b /libjaylink/device.c | |
parent | 4ba7e4323d2d919797427acdf8f9a7db71ced3b8 (diff) | |
download | libjaylink-356f801cdd733737cf09ad6a3765ebdc9ee9f4bb.zip libjaylink-356f801cdd733737cf09ad6a3765ebdc9ee9f4bb.tar.gz libjaylink-356f801cdd733737cf09ad6a3765ebdc9ee9f4bb.tar.bz2 |
Make use of the host interface support
Diffstat (limited to 'libjaylink/device.c')
-rw-r--r-- | libjaylink/device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libjaylink/device.c b/libjaylink/device.c index 7cca7cc..7ff4ac2 100644 --- a/libjaylink/device.c +++ b/libjaylink/device.c @@ -216,6 +216,7 @@ JAYLINK_API int jaylink_device_get_serial_number( * * @retval JAYLINK_OK Success. * @retval JAYLINK_ERR_ARG Invalid arguments. + * @retval JAYLINK_ERR_NOT_SUPPORTED Operation not supported. * * @see jaylink_device_get_serial_number() to get the serial number of a device. */ @@ -225,6 +226,9 @@ JAYLINK_API int jaylink_device_get_usb_address(const struct jaylink_device *dev, if (!dev || !address) return JAYLINK_ERR_ARG; + if (dev->interface != JAYLINK_HIF_USB) + return JAYLINK_ERR_NOT_SUPPORTED; + *address = dev->usb_address; return JAYLINK_OK; |