File reverse-3d5627d7-for-xen.patch of Package virt-viewer
Revert this commit
From: Marc-André Lureau marcandre.lureau@gmail.com Wed Nov 12 11:14:19 2014 +0100
Subject: virt-viewer: allow connection to unix socket only server
Date: Tue Nov 25 15:07:32 2014 +0100:
Git: 3d5627d79a32bea5337659652e09be0d009940a4
Even when the server doesn't provide a display connection address,
virt-viewer is able to connect to guest with libvirt attach.
Index: virt-viewer-4.0/src/virt-viewer.c
===================================================================
--- virt-viewer-4.0.orig/src/virt-viewer.c
+++ virt-viewer-4.0/src/virt-viewer.c
@@ -515,18 +515,17 @@ virt_viewer_extract_connect_info(VirtVie
ghost = virt_viewer_extract_xpath_string(xmldesc, xpath);
} else {
xpath = g_strdup_printf("string(/domain/devices/graphics[@type='%s']/@socket)", type);
- unixsock = virt_viewer_extract_xpath_string(xmldesc, xpath);
+ if ((unixsock = virt_viewer_extract_xpath_string(xmldesc, xpath)) == NULL) {
+ virt_viewer_app_simple_message_dialog(app, _("Cannot determine the graphic address for the guest %s"),
+ priv->domkey);
+ goto cleanup;
+ }
}
- if (ghost && gport) {
+ if (ghost && gport)
g_debug("Guest graphics address is %s:%s", ghost, gport);
- } else if (unixsock) {
+ else if (unixsock)
g_debug("Guest graphics address is %s", unixsock);
- } else {
- g_debug("Using direct libvirt connection");
- retval = TRUE;
- goto cleanup;
- }
uri = virConnectGetURI(priv->conn);
if (virt_viewer_util_extract_host(uri, NULL, &host, &transport, &user, &port) < 0) {