File xenapi-console-protocol.patch of Package xen.import4929

Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3925,6 +3925,14 @@ class XendDomainInfo:
             if not config.has_key('backend'):
                 config['backend'] = "00000000-0000-0000-0000-000000000000"
 
+        if dev_class == 'console':
+            if not config.has_key('protocol'):
+                con_type = config.get('type', '')
+                if con_type == 'vnc':
+                    config['protocol'] = 'rfb'
+                elif con_type == 'sdl':
+                    config['protocol'] = 'rdp'
+
         return config
 
     def get_dev_property(self, dev_class, dev_uuid, field):
openSUSE Build Service is sponsored by