diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-02-29 15:05:59 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-01 15:15:02 +0100 |
commit | 9a322010a361491492915ee71afb23508beb6c94 (patch) | |
tree | 9597a38f8b28882b764786c9d35da744fe3f9507 | |
parent | 9d7c9000c3bde077cb4e04eab38998280daa50b0 (diff) |
spice: fix connecting via ssh to a password-protected server
spice_session_connect() will attempt to connect directly to the
server, we need to continue calling spice_session_open_fd() for ssh
tunnel to work.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/virt-viewer-session-spice.c | 9 | ||||
-rw-r--r-- | virt-viewer.spec.in | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 6cf01c3..e94924c 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ GTK2_REQUIRED="2.18.0" GTK3_REQUIRED="3.0" GTK_VNC1_REQUIRED="0.3.8" GTK_VNC2_REQUIRED="0.4.0" -SPICE_GTK_REQUIRED="0.9.11" +SPICE_GTK_REQUIRED="0.10.3" AC_PROG_CC AM_PROG_CC_C_O diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c index eacb6e6..51ecebf 100644 --- a/src/virt-viewer-session-spice.c +++ b/src/virt-viewer-session-spice.c @@ -316,8 +316,15 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED if (ret < 0) { g_signal_emit_by_name(session, "session-cancelled"); } else { + gboolean openfd; + g_object_set(self->priv->session, "password", password, NULL); - spice_session_connect(self->priv->session); + g_object_get(self->priv->session, "client-sockets", &openfd, NULL); + + if (openfd) + spice_session_open_fd(self->priv->session, -1); + else + spice_session_connect(self->priv->session); } break; default: diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in index d1dbd45..277065d 100644 --- a/virt-viewer.spec.in +++ b/virt-viewer.spec.in @@ -46,9 +46,9 @@ BuildRequires: gtk-vnc-devel >= 0.3.8 %endif %if %{with_spice} %if %{with_gtk3} -BuildRequires: spice-gtk3-devel >= 0.9 +BuildRequires: spice-gtk3-devel >= 0.10.3 %else -BuildRequires: spice-gtk-devel >= 0.9 +BuildRequires: spice-gtk-devel >= 0.10.3 %endif %endif BuildRequires: /usr/bin/pod2man |