Blame 0143-usb-redir-Notify-our-peer-when-we-reject-a-device-du.patch
|
Hans de Goede |
18956f |
From 89c9752afa77c6936ab9839d8fb1ce42147086b2 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
18956f |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
18956f |
Date: Thu, 29 Mar 2012 16:41:23 +0200
|
|
Hans de Goede |
18956f |
Subject: [PATCH 143/146] usb-redir: Notify our peer when we reject a device
|
|
Hans de Goede |
18956f |
due to a speed mismatch
|
|
Hans de Goede |
18956f |
|
|
Hans de Goede |
18956f |
Also cleanup (reset) our device state when we reject a device due to a
|
|
Hans de Goede |
18956f |
speed mismatch.
|
|
Hans de Goede |
18956f |
|
|
Hans de Goede |
18956f |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
18956f |
---
|
|
Hans de Goede |
18956f |
usb-redir.c | 8 +++++++-
|
|
Hans de Goede |
18956f |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
Hans de Goede |
18956f |
|
|
Hans de Goede |
18956f |
diff --git a/usb-redir.c b/usb-redir.c
|
|
Hans de Goede |
18956f |
index f64443e..8ee3f07 100644
|
|
Hans de Goede |
18956f |
--- a/usb-redir.c
|
|
Hans de Goede |
18956f |
+++ b/usb-redir.c
|
|
Hans de Goede |
18956f |
@@ -845,7 +845,13 @@ static void usbredir_do_attach(void *opaque)
|
|
Hans de Goede |
18956f |
{
|
|
Hans de Goede |
18956f |
USBRedirDevice *dev = opaque;
|
|
Hans de Goede |
18956f |
|
|
Hans de Goede |
18956f |
- usb_device_attach(&dev->dev);
|
|
Hans de Goede |
18956f |
+ if (usb_device_attach(&dev->dev) != 0) {
|
|
Hans de Goede |
18956f |
+ usbredir_device_disconnect(dev);
|
|
Hans de Goede |
18956f |
+ if (usbredirparser_peer_has_cap(dev->parser, usb_redir_cap_filter)) {
|
|
Hans de Goede |
18956f |
+ usbredirparser_send_filter_reject(dev->parser);
|
|
Hans de Goede |
18956f |
+ usbredirparser_do_write(dev->parser);
|
|
Hans de Goede |
18956f |
+ }
|
|
Hans de Goede |
18956f |
+ }
|
|
Hans de Goede |
18956f |
}
|
|
Hans de Goede |
18956f |
|
|
Hans de Goede |
18956f |
/*
|
|
Hans de Goede |
18956f |
--
|
|
Hans de Goede |
18956f |
1.7.9.3
|
|
Hans de Goede |
18956f |
|