From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNi43-00061h-U5 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 06:38:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNi42-0003wi-Ks for qemu-devel@nongnu.org; Mon, 15 Oct 2012 06:38:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNi42-0003wR-DW for qemu-devel@nongnu.org; Mon, 15 Oct 2012 06:38:26 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9FAcP7c011736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Oct 2012 06:38:25 -0400 From: Hans de Goede Date: Mon, 15 Oct 2012 12:38:29 +0200 Message-Id: <1350297511-25437-21-git-send-email-hdegoede@redhat.com> In-Reply-To: <1350297511-25437-1-git-send-email-hdegoede@redhat.com> References: <1350297511-25437-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect on bad ep info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede --- 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 9e88779..26f501a 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1382,7 +1382,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: @@ -1392,7 +1393,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