[Spice-commits] 2 commits - src/channel-usbredir.c src/spice-session.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 11 10:26:21 UTC 2018
src/channel-usbredir.c | 1 +
src/spice-session.c | 7 -------
2 files changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 972a61db8a6d48b173107ed45d8bdd8ea31abbde
Author: Victor Toso <me at victortoso.com>
Date: Fri Apr 6 09:59:44 2018 +0200
channel-usbredir: Fix crash on channel-up
By adding a guard to not handle channel-up on SpiceUsbredirChannel in
case struct usbredirhost wasn't initialized yet. Same guard is in
place for the generic usbredir_handle_msg() function to avoid handling
Server's message while Client's initialization is not done.
As mentioned in commit 291f3e4419e6, this isn't a problem for
graphical clients as some initialization is done to present the
shareable usb devices to user.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1399838
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index 39b888d..6ffe546 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -817,6 +817,7 @@ static void spice_usbredir_channel_up(SpiceChannel *c)
SpiceUsbredirChannel *channel = SPICE_USBREDIR_CHANNEL(c);
SpiceUsbredirChannelPrivate *priv = channel->priv;
+ g_return_if_fail(priv->host != NULL);
/* Flush any pending writes */
usbredirhost_write_guest_data(priv->host);
}
commit 139f84da142606bd3e40b9b02bc56e0c86e4fff5
Author: Victor Toso <me at victortoso.com>
Date: Mon Jun 11 12:14:30 2018 +0200
Revert "channel-usbredir: Fix crash on channel-up"
This reverts commit 291f3e4419e6fb4077ae43a5e09eb1c37b9dd729.
Follow up patch should address rhbz#1399838 mentioned in commit above
in a different way.
Major reason to revert is that the SpiceUsbDeviceManager object is
kept in SpiceSession as an easy way to share it between different
SpiceUsbredirChannel while SpiceSession itself does not use it. This
causes problems on migration as we start a new session with a new
SpiceUsbDeviceManager object while the previous one still exists.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1558043
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/spice-session.c b/src/spice-session.c
index 5950c35..ee6e4cf 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -276,7 +276,6 @@ static void spice_session_init(SpiceSession *session)
{
SpiceSessionPrivate *s;
gchar *channels;
- GError *err = NULL;
SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
s = session->priv = spice_session_get_instance_private(session);
@@ -289,12 +288,6 @@ static void spice_session_init(SpiceSession *session)
s->images = cache_image_new((GDestroyNotify)pixman_image_unref);
s->glz_window = glz_decoder_window_new();
update_proxy(session, NULL);
-
- s->usb_manager = spice_usb_device_manager_get(session, &err);
- if (err != NULL) {
- SPICE_DEBUG("Could not initialize SpiceUsbDeviceManager - %s", err->message);
- g_clear_error(&err);
- }
}
static void
More information about the Spice-commits
mailing list