From 53fec8ac43cd094cd7197e99cbb5ffd7c6eb8514 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 18 Feb 2016 06:14:59 -0800 Subject: [PATCH] Add timeout to ioctl requests --- lib/inputdev/HIDDeviceUdev.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/inputdev/HIDDeviceUdev.cpp b/lib/inputdev/HIDDeviceUdev.cpp index 7364a00..0ec291b 100644 --- a/lib/inputdev/HIDDeviceUdev.cpp +++ b/lib/inputdev/HIDDeviceUdev.cpp @@ -47,7 +47,7 @@ class HIDDeviceUdev final : public IHIDDevice { m_usbIntfOutPipe | USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, (unsigned)length, - 0, + 30, (void*)data }; int ret = ioctl(m_devFd, USBDEVFS_BULK, &xfer); @@ -66,7 +66,7 @@ class HIDDeviceUdev final : public IHIDDevice { m_usbIntfInPipe | USB_DIR_IN, (unsigned)length, - 0, + 30, data }; return ioctl(m_devFd, USBDEVFS_BULK, &xfer); @@ -204,7 +204,7 @@ class HIDDeviceUdev final : public IHIDDevice message, 0, (uint16_t)length, - 0, + 30, (void*)data }; int ret = ioctl(m_devFd, USBDEVFS_CONTROL, &xfer);