usb-redir: Reset device address and speed on disconnect

Without this disconnected devices look like the last redirected device
in the monitor in "info usb".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Hans de Goede 2012-03-31 17:14:22 +02:00 committed by Gerd Hoffmann
parent 1510168e27
commit a0625c56e0
1 changed files with 2 additions and 0 deletions

View File

@ -1136,6 +1136,8 @@ static void usbredir_device_disconnect(void *priv)
}
usb_ep_init(&dev->dev);
dev->interface_info.interface_count = NO_INTERFACE_INFO;
dev->dev.addr = 0;
dev->dev.speed = 0;
}
static void usbredir_interface_info(void *priv,