[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: vncviewer: unconditionally read listen port address and password
# HG changeset patch # User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> # Date 1296845240 0 # Node ID c77353cb2ebb328a247046c959b04c63b4f79609 # Parent 3cd9f9db5c21df2cb168381a16736ae90bebe7ab libxl: vncviewer: unconditionally read listen port address and password The /local/domain/DOMID/device/vfb/0/backend path is irrelevant. libxl does not create it, so the branch would never be taken. Instead, simply read the target paths of interest. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff -r 3cd9f9db5c21 -r c77353cb2ebb tools/libxl/libxl.c --- a/tools/libxl/libxl.c Fri Feb 04 18:46:22 2011 +0000 +++ b/tools/libxl/libxl.c Fri Feb 04 18:47:20 2011 +0000 @@ -791,7 +791,7 @@ int libxl_vncviewer_exec(libxl_ctx *ctx, int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass) { libxl__gc gc = LIBXL_INIT_GC(ctx); - const char *vnc_port, *vfb_back; + const char *vnc_port; const char *vnc_listen = NULL, *vnc_pass = NULL; int port = 0, autopass_fd = -1; char *vnc_bin, *args[] = { @@ -807,18 +807,14 @@ int libxl_vncviewer_exec(libxl_ctx *ctx, if ( vnc_port ) port = atoi(vnc_port) - 5900; - vfb_back = libxl__xs_read(&gc, XBT_NULL, - libxl__sprintf(&gc, - "/local/domain/%d/device/vfb/0/backend", domid)); - if ( vfb_back ) { - vnc_listen = libxl__xs_read(&gc, XBT_NULL, - libxl__sprintf(&gc, + vnc_listen = libxl__xs_read(&gc, XBT_NULL, + libxl__sprintf(&gc, "/local/domain/%d/console/vnc-listen", domid)); - if ( autopass ) - vnc_pass = libxl__xs_read(&gc, XBT_NULL, - libxl__sprintf(&gc, + + if ( autopass ) + vnc_pass = libxl__xs_read(&gc, XBT_NULL, + libxl__sprintf(&gc, "/local/domain/%d/console/vnc-pass", domid)); - } if ( NULL == vnc_listen ) vnc_listen = "localhost"; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |