]> xenbits.xensource.com Git - libvirt.git/commitdiff
Added a port='...' attribute to <graphics> tag for VNC displays. Initially hardcoded...
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Aug 2006 19:53:41 +0000 (19:53 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Aug 2006 19:53:41 +0000 (19:53 +0000)
ChangeLog
src/xend_internal.c

index d7f94ac09ce5e81c0a865ab2f5447637f43e01c1..44d654e7a94179e6a75961ade4b270613ba81f22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Aug  7 11:06:20 EDT 2006 Daniel Berrange <berrange@redhat.com>
+
+       * src/xend_internal.c: Added a 'port' attribute to the '<graphics>'
+       tag when display type is VNC, providing the port number on which
+       the VNC server is listening.
+       
 Mon Aug  7 18:47:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
 
        * include/libvirt/libvirt.h.in: previous change to libvirt.h should
index ab5ed6d5b7a8bca42d0847a715efc3cae819091f..4eae24145d56f6df3428c709d0882f1eb08ff338 100644 (file)
@@ -1598,13 +1598,12 @@ xend_parse_sexp_desc(struct sexpr *root)
 
     if (hvm) {
         /* Graphics device */
-        /* TODO:
-         * Support for some additional attributes for graphics device?
-         */
         tmp = sexpr_node(root, "domain/image/hvm/vnc");
+       /* XXX extract VNC port from XenStore if its available */
         if (tmp != NULL) {
             if (tmp[0] == '1')
-                virBufferAdd(&buf, "    <graphics type='vnc'/>\n", 27 );
+                virBufferVSprintf(&buf, "    <graphics type='vnc' port='%d'/>\n", 
+                                  5900 + sexpr_int(root, "domain/domid"));
         }
         
         tmp = sexpr_node(root, "domain/image/hvm/sdl");