aboutsummaryrefslogtreecommitdiffstats
path: root/xd_view.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2006-11-07 14:32:36 +0000
committerkraxel <kraxel>2006-11-07 14:32:36 +0000
commit701c9668cabe7a3c2bf0151a4474b981ec010c66 (patch)
tree996b3a57028b1d707ffb61895388cacadd9509fa /xd_view.c
parente16c481d49db8954e9f90941265b1a75d4ada29e (diff)
downloadxenwatch-701c9668cabe7a3c2bf0151a4474b981ec010c66.tar.gz
s/displayno/tcpport/
Diffstat (limited to 'xd_view.c')
-rw-r--r--xd_view.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xd_view.c b/xd_view.c
index f89b0b4..c809cb6 100644
--- a/xd_view.c
+++ b/xd_view.c
@@ -132,15 +132,15 @@ static void open_tty(gint id, char *name, char *tty)
}
}
-static void open_vnc(gint id, char *hostname, gint displayno)
+static void open_vnc(gint id, char *hostname, gint tcpport)
{
#ifdef HAVE_VNCCLIENT
if (1) {
- vnc_open(hostname, displayno, VNC_FLAG_US_KBD, 0);
+ vnc_open(hostname, tcpport, VNC_FLAG_US_KBD, 0);
return;
}
#endif
- if (-1 == open_vnc_session(hostname, id))
+ if (-1 == open_vnc_session(hostname, tcpport))
gtk_message(GTK_MESSAGE_ERROR, app_error);
}
@@ -304,7 +304,7 @@ static void menu_cb_mdns(void)
static void menu_cb_open_vnc(void)
{
char *name, *tty, *ostype;
- gint id = -1, vncport, displayno = -1;
+ gint id = -1, vncport, tcpport = -1;
if (!get_domain(&id, &name, &ostype, &tty, &vncport))
return;
@@ -313,14 +313,14 @@ static void menu_cb_open_vnc(void)
if (vncport)
/* xen 3.0.3+ */
- displayno = vncport - 5900;
+ tcpport = vncport;
else if (0 == strcmp(ostype, "hvm")) {
/* xen 3.0.2 */
- displayno = id;
+ tcpport = id + 5900;
}
- if (-1 != displayno)
- open_vnc(id, "localhost", displayno);
+ if (-1 != tcpport)
+ open_vnc(id, "localhost", tcpport);
else
gtk_message(GTK_MESSAGE_ERROR, "Domain has no graphical display.\n");
}