qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect o


From: Hans de Goede
Subject: [Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect on bad ep info
Date: Wed, 24 Oct 2012 18:14:16 +0200

So that the client gets a notification about us disconnecting the device.

Signed-off-by: Hans de Goede <address@hidden>
---
 hw/usb/redirect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index fe4eeea..b1fc7ef 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1378,7 +1378,8 @@ static void usbredir_ep_info(void *priv,
         case usb_redir_type_interrupt:
             if (dev->endpoint[i].interval == 0) {
                 ERROR("Received 0 interval for isoc or irq endpoint\n");
-                usbredir_device_disconnect(dev);
+                usbredir_reject_device(dev);
+                return;
             }
             /* Fall through */
         case usb_redir_type_control:
@@ -1388,7 +1389,7 @@ static void usbredir_ep_info(void *priv,
             break;
         default:
             ERROR("Received invalid endpoint type\n");
-            usbredir_device_disconnect(dev);
+            usbredir_reject_device(dev);
             return;
         }
     }
-- 
1.7.12.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]