diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-08-30 12:01:05 +0200 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-08-30 12:01:05 +0200 |
commit | 2e2b21d3cc6c33aaac077a2bfd1a09df0ea33c13 (patch) | |
tree | 544bdc8ec4b2e67c987bca42f3a024382ad1324f /ltunify.c | |
parent | ab2cd7e6194dc07a743b3cf3d85dde2f760091cd (diff) | |
download | ltunify-2e2b21d3cc6c33aaac077a2bfd1a09df0ea33c13.tar.gz |
ltunify: ignore DJ reports
Fixes the warning messages below:
$ ltunify unpair 2
Unexpected disconnection type 0000
Device 0x02 Touchpad successfully unpaired
$ ltunify pair
Please turn your wireless device off and on to start pairing.
Found new device, id=0x02 Touchpad
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Dev conn notif is expected to be short, got 0x20 instead
Diffstat (limited to 'ltunify.c')
-rw-r--r-- | ltunify.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -414,6 +414,12 @@ static bool do_read_skippy(int fd, struct hidpp_message *msg, if (msg->report_id == exp_report_id && msg->sub_id == exp_sub_id) { return true; } + + /* ignore non-HID++ reports (e.g. DJ reports) */ + if (msg->report_id != SHORT_MESSAGE && msg->report_id != LONG_MESSAGE) { + continue; + } + // guess: 0xFF is error message in HID++ 2.0? if (msg->report_id == LONG_MESSAGE && msg->sub_id == 0xFF) { if (debug_enabled) { |