Commit afc5872b authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

usb-backend: Fix spice-usbredir-redirect-on-connect option

After commit 3e20f17b (cfr
"usb-redir: extend USB backend to support emulated devices")
this option stopped working, as devices are not redirected.
Data for device to guest were not written during initialisation.

With this fix both spice-usbredir-redirect-on-connect and
spice-share-cd are working (even together).

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1874740

.
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin's avatarUri Lublin <uril@redhat.com>
parent ee7f5908
Pipeline #216931 passed with stage
in 5 minutes
......@@ -418,7 +418,7 @@ static void usbredir_write_flush_callback(void *user_data)
return;
}
if (is_channel_ready(ch->usbredir_channel)) {
if (ch->state == USB_CHANNEL_STATE_HOST) {
if (ch->state != USB_CHANNEL_STATE_PARSER && ch->usbredirhost != NULL) {
SPICE_DEBUG("%s ch %p -> usbredirhost", __FUNCTION__, ch);
usbredirhost_write_guest_data(ch->usbredirhost);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment