Skip to content

Commit

Permalink
usbredir: avoid queuing hello packet on snapshot restore
Browse files Browse the repository at this point in the history
When launching QEMU with "-loadvm", usbredir_create_parser() should avoid
setting up the hello packet (just as with "-incoming". On the latest version
of libusbredir, usbredirparser_unserialize() will return error if the parser
is not "pristine."
  • Loading branch information
osy committed Aug 8, 2022
1 parent 6e9f737 commit f129a2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/usb/redirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,8 @@ static void usbredir_create_parser(USBRedirDevice *dev)
}
#endif

if (runstate_check(RUN_STATE_INMIGRATE)) {
if (runstate_check(RUN_STATE_INMIGRATE) ||
runstate_check(RUN_STATE_RESTORE_VM)) {
flags |= usbredirparser_fl_no_hello;
}
usbredirparser_init(dev->parser, VERSION, caps, USB_REDIR_CAPS_SIZE,
Expand Down

0 comments on commit f129a2b

Please sign in to comment.