channel_reset gets called from spice_channel_disconnect, and spice_usbredir_channel_disconnect calls spice_channel_disconnect (so as to disconnect the channel when a usb device gets disconnected).
So calling spice_usbredir_channel_disconnect from channel_reset leads to undesirable recursion. More over calling spice_usbredir_channel_disconnect disconnects / closes both the channel and *the usb device* and closing the usb device on migration is not what we want. Note that currently migration of usbredir channels does not work, and this patch does not fix this, but it does fix a regression when disconnecting usb devices normally (by unplugging them for example). Signed-off-by: Hans de Goede <[email protected]> --- gtk/channel-usbredir.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c index 28c4003..5f0f409 100644 --- a/gtk/channel-usbredir.c +++ b/gtk/channel-usbredir.c @@ -109,8 +109,6 @@ static void spice_usbredir_channel_init(SpiceUsbredirChannel *channel) #ifdef USE_USBREDIR static void spice_usbredir_channel_reset(SpiceChannel *channel, gboolean migrating) { - spice_usbredir_channel_disconnect(SPICE_USBREDIR_CHANNEL(channel)); - SPICE_CHANNEL_CLASS(spice_usbredir_channel_parent_class)->channel_reset(channel, migrating); } #endif -- 1.7.7.4 _______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
