]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote_driver: don't fail if keepalive check fails
authorGuido Günther <agx@sigxcpu.org>
Sun, 4 Dec 2011 14:26:23 +0000 (15:26 +0100)
committerGuido Günther <agx@sigxcpu.org>
Mon, 5 Dec 2011 12:27:12 +0000 (13:27 +0100)
Otherwise connections to older libvirt abort with:

$ virsh -c qemu+ssh://host.example.com/system list
error: invalid connection pointer in virDrvSupportsFeature
error: failed to connect to the hypervisor

Tested against 0.8.3 and 0.9.8-rc2.

src/remote/remote_driver.c

index 556c90c4380ea65076ca7a2e18bed75f49d6b34e..1fb0eca2d5483a7cb01c944db026f9f759814c0f 100644 (file)
@@ -678,10 +678,8 @@ doRemoteOpen (virConnectPtr conn,
         rc = call(conn, priv, 0, REMOTE_PROC_SUPPORTS_FEATURE,
                   (xdrproc_t)xdr_remote_supports_feature_args, (char *) &args,
                   (xdrproc_t)xdr_remote_supports_feature_ret, (char *) &ret);
-        if (rc == -1)
-            goto failed;
 
-        if (ret.supported) {
+        if (rc != -1 && ret.supported) {
             priv->serverKeepAlive = true;
         } else {
             VIR_INFO("Disabling keepalive protocol since it is not supported"