[gnome-boxes] spice-session: Do not transfer open_fd() ownership
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] spice-session: Do not transfer open_fd() ownership
- Date: Mon, 24 Apr 2017 13:15:29 +0000 (UTC)
commit 3779c064d35d0ec0a3a53b1f7b12c81281db18b1
Author: Pavel Grunt <pgrunt redhat com>
Date: Mon Apr 24 15:02:43 2017 +0200
spice-session: Do not transfer open_fd() ownership
Otherwise just one channel can connect
https://bugzilla.gnome.org/show_bug.cgi?id=780963
src/spice-display.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 7646f94..0483185 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -236,7 +236,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
channel_destroy_id = session.channel_destroy.connect (on_channel_destroy);
session.password = password;
- if (open_fd != null)
+ if (this.open_fd != null)
session.open_fd (-1);
else
session.connect ();
@@ -259,7 +259,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
}
private void on_channel_new (Spice.Session session, Spice.Channel channel) {
- var handler = new SpiceChannelHandler (this, channel, (owned) open_fd);
+ var handler = new SpiceChannelHandler (this, channel, open_fd);
channel_handlers.set (channel, handler);
if (channel is Spice.DisplayChannel) {
@@ -499,10 +499,10 @@ private class Boxes.SpiceChannelHandler : GLib.Object {
private Spice.Channel channel;
private Display.OpenFDFunc? open_fd;
- public SpiceChannelHandler (SpiceDisplay display, Spice.Channel channel, owned Display.OpenFDFunc?
open_fd = null) {
+ public SpiceChannelHandler (SpiceDisplay display, Spice.Channel channel, Display.OpenFDFunc? open_fd =
null) {
this.display = display;
this.channel = channel;
- this.open_fd = (owned) open_fd;
+ this.open_fd = open_fd;
var id = channel.channel_id;
if (open_fd != null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]