diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-04-18 15:40:03 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-04-23 10:03:35 +0200 |
commit | 4a0ac907cabd40ebed3ec2160a0f27826b74783e (patch) | |
tree | f1b07a0bc48065462d2f79410d5e866e6985be0b /android/hidhost.c | |
parent | cdfdc6b2b6182ef09c28d49873f79c581ab04de5 (diff) | |
download | bluez-4a0ac907cabd40ebed3ec2160a0f27826b74783e.tar.gz |
android/hidhost: Fix handle_uhid_output
Data from kernel is not in form of hex string. Just copy it instead of
converting from hex string.
Diffstat (limited to 'android/hidhost.c')
-rw-r--r-- | android/hidhost.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/android/hidhost.c b/android/hidhost.c index d45e1bd9d..b8d2d8f84 100644 --- a/android/hidhost.c +++ b/android/hidhost.c @@ -180,13 +180,13 @@ static void handle_uhid_output(struct hid_device *dev, if (!(dev->ctrl_io)) return; - req_size = 1 + (output->size / 2); + req_size = 1 + output->size; req = g_try_malloc0(req_size); if (!req) return; req[0] = HID_MSG_SET_REPORT | output->rtype; - hex2buf(output->data, req + 1, req_size - 1); + memcpy(req + 1, output->data, req_size - 1); fd = g_io_channel_unix_get_fd(dev->ctrl_io); |