[PATCH 11/11] vz: change vzConnectIsAlive behavior

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

 



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

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]