mirror of https://github.com/xqemu/xqemu.git
usb-redir: Don't make migration fail in none seamless case
Instead simple disconnect the device like host redirection does on migration. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
dbbf01958e
commit
5c16f76781
|
@ -1614,12 +1614,17 @@ static int usbredir_get_parser(QEMUFile *f, void *priv, size_t unused)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Our chardev should be open already at this point, otherwise
|
* If our chardev is not open already at this point the usbredir connection
|
||||||
* the usbredir channel will be broken (ie spice without seamless)
|
* has been broken (non seamless migration, or restore from disk).
|
||||||
|
*
|
||||||
|
* In this case create a temporary parser to receive the migration data,
|
||||||
|
* and schedule the close_bh to report the device as disconnected to the
|
||||||
|
* guest and to destroy the parser again.
|
||||||
*/
|
*/
|
||||||
if (dev->parser == NULL) {
|
if (dev->parser == NULL) {
|
||||||
ERROR("get_parser called with closed chardev, failing migration\n");
|
WARNING("usb-redir connection broken during migration\n");
|
||||||
return -1;
|
usbredir_create_parser(dev);
|
||||||
|
qemu_bh_schedule(dev->chardev_close_bh);
|
||||||
}
|
}
|
||||||
|
|
||||||
data = g_malloc(len);
|
data = g_malloc(len);
|
||||||
|
|
Loading…
Reference in New Issue