Now it detects if a connection to vz dispatcher is up or not by
comparing current driver to connection stored pointer.
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/vz/vz_driver.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index b3ce404..7d7cb17 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -824,8 +824,12 @@ static int vzConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
return 1;
}
-static int vzConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
+static int vzConnectIsAlive(virConnectPtr conn)
{
+ vzConnPtr privconn = conn->privateData;
+ if (privconn->driver != vz_driver)
+ return 0;
+
return 1;
}
--
2.4.3