summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-app.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-04-03 14:06:22 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-06-10 11:46:05 +0200
commite214d6b1d5f3f8b526ebc4f97045d29c1819d0b2 (patch)
tree44940d9b044db0101fa4f1b7008a60716e03a6ae /src/virt-viewer-app.h
parent854dbf7ad0517a070ffcd73d860e24605c595146 (diff)
downloadvirt-viewer-e214d6b1d5f3f8b526ebc4f97045d29c1819d0b2.tar.gz
virt-viewer-e214d6b1d5f3f8b526ebc4f97045d29c1819d0b2.tar.xz
virt-viewer-e214d6b1d5f3f8b526ebc4f97045d29c1819d0b2.zip
Don't connect to localhost when using --direct
Trying to connect to a remote virtual machine using virt-viewer -c qemu+ssh://example.com/system --direct $vm_name will currently fail with an error message saying it's not possible to localhost. This happens with VMs which listen on a wildcard address (eg '0.0.0.0'). This was introduced by commit 74b1b62 which changes the host to connect to to 'localhost' when trying to connect through ssh to a VM listening on a wildcard address. This is only valid when using a ssh tunnel, and should not be done with --direct. The fallback code which uses the hostname from the libvirt URI is what makes the most sense in this situation (wildcard listen address + --direct). This commit introduces a virt_viewer_app_get_direct() so that this can be implemented. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1079211
Diffstat (limited to 'src/virt-viewer-app.h')
-rw-r--r--src/virt-viewer-app.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/virt-viewer-app.h b/src/virt-viewer-app.h
index 5058281..6a53992 100644
--- a/src/virt-viewer-app.h
+++ b/src/virt-viewer-app.h
@@ -73,6 +73,7 @@ gboolean virt_viewer_app_activate(VirtViewerApp *self, GError **error);
gboolean virt_viewer_app_initial_connect(VirtViewerApp *self, GError **error);
void virt_viewer_app_start_reconnect_poll(VirtViewerApp *self);
void virt_viewer_app_set_zoom_level(VirtViewerApp *self, gint zoom_level);
+gboolean virt_viewer_app_get_direct(VirtViewerApp *self);
void virt_viewer_app_set_direct(VirtViewerApp *self, gboolean direct);
void virt_viewer_app_set_hotkeys(VirtViewerApp *self, const gchar *hotkeys);
void virt_viewer_app_set_attach(VirtViewerApp *self, gboolean attach);