ia64/xen-unstable

diff tools/ioemu/vnc.c @ 10805:2b1a49dd1273

[qemu] Use domain-name in VNC window title.
Set the VNC window title with domain-name.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Wed Jul 26 14:26:03 2006 +0100 (2006-07-26)
parents 060025203f54
children 3e07ec30c445
line diff
     1.1 --- a/tools/ioemu/vnc.c	Wed Jul 26 14:20:13 2006 +0100
     1.2 +++ b/tools/ioemu/vnc.c	Wed Jul 26 14:26:03 2006 +0100
     1.3 @@ -850,6 +850,7 @@ static int protocol_client_msg(VncState 
     1.4  
     1.5  static int protocol_client_init(VncState *vs, char *data, size_t len)
     1.6  {
     1.7 +    size_t l;
     1.8      char pad[3] = { 0, 0, 0 };
     1.9  
    1.10      vs->width = vs->ds->width;
    1.11 @@ -886,8 +887,10 @@ static int protocol_client_init(VncState
    1.12  	
    1.13      vnc_write(vs, pad, 3);           /* padding */
    1.14  
    1.15 -    vnc_write_u32(vs, 4);        
    1.16 -    vnc_write(vs, "QEMU", 4);
    1.17 +    l = strlen(domain_name); 
    1.18 +    vnc_write_u32(vs, l);        
    1.19 +    vnc_write(vs, domain_name, l);
    1.20 +
    1.21      vnc_flush(vs);
    1.22  
    1.23      vnc_read_when(vs, protocol_client_msg, 1);