diff options
author | Frediano Ziglio <freddy77@gmail.com> | 2020-09-23 17:05:01 +0100 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-10-22 11:21:54 +0100 |
commit | afc5872bff1eb327dd299bacdc4eec5e26d37a10 (patch) | |
tree | 2037ccae82b58e4061b5c02b3792e26dffee2844 | |
parent | ee7f5908cff0cae246a220a29ac721e48cddcd14 (diff) |
usb-backend: Fix spice-usbredir-redirect-on-connect option
After commit 3e20f17b90598e740c4e274b81d99f28187da800 (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 <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
-rw-r--r-- | src/usb-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usb-backend.c b/src/usb-backend.c index a4a5f0a..857488e 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -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 { |