[PATCH 3/4] virsh: Pass ctl to virshCatchDisconnect

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

 



virshCatchDisconnect expects ctl, but we were just passing NULL instead.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tools/virsh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 7484bed..2b53bf7 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -207,7 +207,7 @@ virshReconnect(vshControl *ctl)
             vshError(ctl, "%s", _("failed to connect to the hypervisor"));
     } else {
         if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
-                                            NULL, NULL) < 0)
+                                            ctl, NULL) < 0)
             vshError(ctl, "%s", _("Unable to register disconnect callback"));
         if (connected)
             vshError(ctl, "%s", _("Reconnected to the hypervisor"));
@@ -294,7 +294,7 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
     }
 
     if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
-                                        NULL, NULL) < 0)
+                                        ctl, NULL) < 0)
         vshError(ctl, "%s", _("Unable to register disconnect callback"));
 
     return true;
-- 
2.6.4

--
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]