+Mon Jun 12 17:22:24 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
+
+ * src/xend_internal.c: Call 'xenDomainGetVersion' when trying
+ to open a connection, as a sort of "ping" test to verify the
+ Xen daemon connection - fail the open method, if the "ping" is
+ not successful.
+
Mon Jun 05 22:31:20 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
* src/test.c, src/test.h: New 'mock' hypervisor driver providing
{
xmlURIPtr uri;
int ret;
+ unsigned long version;
if (name == NULL) {
name = "http://localhost:8000/";
}
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")); */