[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 11/11] vz: change vzConnectIsAlive behavior



Now it detects if a connection to vz dispatcher is up or not

Signed-off-by: Maxim Nestratov <mnestratov 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]