elmarco pushed to spice-gtk (f22). "Fix audio and usb channels with GNOME Boxes. Resolves: rhbz#1220026"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon May 11 09:38:35 UTC 2015
From 5c1f6dbd30fb5ebe3491dba4590caa48bbdea207 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau at gmail.com>
Date: Mon, 11 May 2015 11:10:13 +0200
Subject: Fix audio and usb channels with GNOME Boxes. Resolves: rhbz#1220026
diff --git a/0002-audio-channel-new-handler-to-be-after-default-handle.patch b/0002-audio-channel-new-handler-to-be-after-default-handle.patch
new file mode 100644
index 0000000..efef9c3
--- /dev/null
+++ b/0002-audio-channel-new-handler-to-be-after-default-handle.patch
@@ -0,0 +1,39 @@
+From 81d8175d9d6a8297b10cead6c951bf560f61be4c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau at redhat.com>
+Date: Tue, 28 Apr 2015 14:30:28 +0200
+Subject: [PATCH spice-gtk] audio: channel-new handler to be after default
+ handlers
+
+Client usually connect to channel-new to connect their
+handlers, such as open-fd.
+
+The audio channel-new handler will call channel_connect() on audio
+channels, which may call open-fd.
+
+However, open-fd can be emitted before the client had a chance to
+connect their handlers (from the channel-new callback).
+
+Connecting after the default handler solves this case.
+
+Fixes:
+https://bugzilla.gnome.org/show_bug.cgi?id=747649
+---
+ gtk/spice-audio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
+index 7784c8b..ce191e1 100644
+--- a/gtk/spice-audio.c
++++ b/gtk/spice-audio.c
+@@ -267,7 +267,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context,
+ return NULL;
+
+ spice_g_signal_connect_object(session, "notify::enable-audio", G_CALLBACK(session_enable_audio), self, 0);
+- spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, 0);
++ spice_g_signal_connect_object(session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER);
+ update_audio_channels(self, session);
+
+ return self;
+--
+2.1.0
+
diff --git a/0003-usb-channel-new-handler-to-be-after-default-handlers.patch b/0003-usb-channel-new-handler-to-be-after-default-handlers.patch
new file mode 100644
index 0000000..d787cbf
--- /dev/null
+++ b/0003-usb-channel-new-handler-to-be-after-default-handlers.patch
@@ -0,0 +1,40 @@
+From 9546b571d7143e4c9efcb022d6016ea1c9ed2536 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau at redhat.com>
+Date: Tue, 28 Apr 2015 14:30:28 +0200
+Subject: [PATCH spice-gtk] usb: channel-new handler to be after default
+ handlers
+
+Client usually connect to channel-new to connect their
+handlers, such as open-fd.
+
+The usbmanager channel-new handler will call channel_connect() on usbredir
+channels, which may call open-fd.
+
+However, open-fd can be emitted before the client had a chance to
+connect their handlers (from the channel-new callback).
+
+Connecting after the default handler solves this case.
+
+Fixes:
+https://bugzilla.gnome.org/show_bug.cgi?id=748665
+---
+ gtk/usb-device-manager.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
+index e11eae0..7aa60c4 100644
+--- a/gtk/usb-device-manager.c
++++ b/gtk/usb-device-manager.c
+@@ -310,8 +310,7 @@ static gboolean spice_usb_device_manager_initable_init(GInitable *initable,
+ #endif
+
+ /* Start listening for usb channels connect/disconnect */
+- g_signal_connect(priv->session, "channel-new",
+- G_CALLBACK(channel_new), self);
++ spice_g_signal_connect_object(priv->session, "channel-new", G_CALLBACK(channel_new), self, G_CONNECT_AFTER);
+ g_signal_connect(priv->session, "channel-destroy",
+ G_CALLBACK(channel_destroy), self);
+ list = spice_session_get_channels(priv->session);
+--
+2.1.0
+
diff --git a/spice-gtk.spec b/spice-gtk.spec
index 4bd0f95..382da3c 100644
--- a/spice-gtk.spec
+++ b/spice-gtk.spec
@@ -2,7 +2,7 @@
Name: spice-gtk
Version: 0.28
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A GTK+ widget for SPICE clients
Group: System Environment/Libraries
@@ -10,7 +10,9 @@ License: LGPLv2+
URL: http://spice-space.org/page/Spice-Gtk
#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
-Patch0: 0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
+Patch1: 0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
+Patch2: 0002-audio-channel-new-handler-to-be-after-default-handle.patch
+Patch3: 0003-usb-channel-new-handler-to-be-after-default-handlers.patch
BuildRequires: intltool
BuildRequires: gtk2-devel >= 2.14
@@ -135,7 +137,9 @@ if [ -n '%{?_version_suffix}' ]; then
fi
pushd spice-gtk-%{version}
-%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
find . -name '*.stamp' | xargs touch
popd
@@ -254,6 +258,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc
%{_bindir}/spicy-stats
%changelog
+* Mon May 11 2015 Marc-Andre Lureau <marcandre.lureau at redhat.com> 0.28-3
+- Fix audio and usb channels with GNOME Boxes.
+ Resolves: rhbz#1220026
+
* Tue Mar 31 2015 Christophe Fergeau <cfergeau at redhat.com> 0.28-2
- Add upstream patch fixing an USB redirection crash
Resolves: rhbz#1182226
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/spice-gtk.git/commit/?h=f22&id=5c1f6dbd30fb5ebe3491dba4590caa48bbdea207
More information about the scm-commits
mailing list