Index: src/xend_internal.c =================================================================== RCS file: /data/cvs/libvirt/src/xend_internal.c,v retrieving revision 1.26 diff -u -r1.26 xend_internal.c --- src/xend_internal.c 27 Apr 2006 14:14:23 -0000 1.26 +++ src/xend_internal.c 12 Jun 2006 15:58:37 -0000 @@ -1651,6 +1651,7 @@ { xmlURIPtr uri; int ret; + unsigned long version; if (name == NULL) { name = "http://localhost:8000/"; @@ -1663,8 +1664,17 @@ } xmlFreeURI(uri); - - return (xenDaemonOpen_tcp(conn, "localhost", 8000)); + + ret = xenDaemonOpen_tcp(conn, "localhost", 8000); + if (ret < 0) { + return ret; + } + + /* A sort of "ping" to make sure the daemon is actually + alive & well, rather than just assuming it is */ + if ((ret = xenDaemonGetVersion(conn, &version)) < 0) { + return ret; + } /* return(xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket")); */