Skip to contentSkip to conversation

Xend: Fix Handling of VNC Params

PATCH New Yosuke Iwamatsu 1 participant 1 message May 8, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Xend: Fix Handling of VNC Params

Sometimes vnc parameters 'vncdisplay' and 'vncunused' are stored as string, so convert to integer in xend before qemu-dm execution.
And also set default=1 for 'vncunused', as directed at the comment of config file.

Regards,
-----------------------
Yosuke Iwamatsu
NEC Corporation

Xend: Fix handling of vnc params.

tools/python/xen/xend/image.py +2 -2
diff -r 9a6ad687ec20 tools/python/xen/xend/image.py
@@ -294,11 +294,11 @@ class ImageHandler:
 
             vnclisten = vnc_config.get('vnclisten',
                                        XendOptions.instance().get_vnclisten_address())
-            vncdisplay = vnc_config.get('vncdisplay', 0)
+            vncdisplay = int(vnc_config.get('vncdisplay', 0))
             ret.append('-vnc')
             ret.append("%s:%s%s" % (vnclisten, vncdisplay, vncopts))
 
-            if vnc_config.get('vncunused', 0):
+            if int(vnc_config.get('vncunused', 1)) != 0:
                 ret.append('-vncunused')
 
         elif has_sdl:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel