Now it detects if a connection to vz dispatcher is up or not
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/vz/vz_driver.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 83bdabe..8abd49f 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -809,6 +809,11 @@ static int vzConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int vzConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
{
+ vzConnPtr privconn = vzGetConnection();
+ if (!privconn)
+ return 0;
+
+ virObjectUnref(privconn);
return 1;
}
--
2.4.3