[virt-tools-list] [v2: virt-viewer: PATCH 2/3] Use 'username' property from .vv file for spice-session

Fabiano Fidêncio fidencio at redhat.com
Mon Oct 6 11:58:03 UTC 2014


---
Changes since v1:
- Improve the commit short-log
---
 src/virt-viewer-session-spice.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 2d142d2..30d6c36 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -348,6 +348,13 @@ fill_session(VirtViewerFile *file, SpiceSession *session)
         g_object_set(G_OBJECT(session), "tls-port", tls_port, NULL);
         g_free(tls_port);
     }
+
+    if (virt_viewer_file_is_set(file, "username")) {
+        gchar *val = virt_viewer_file_get_username(file);
+        g_object_set(G_OBJECT(session), "username", val, NULL);
+        g_free(val);
+    }
+
     if (virt_viewer_file_is_set(file, "password")) {
         gchar *val = virt_viewer_file_get_password(file);
         g_object_set(G_OBJECT(session), "password", val, NULL);
-- 
2.1.0




More information about the virt-tools-list mailing list