mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
virsh: Pass ctl to virshCatchDisconnect
virshCatchDisconnect expects ctl, but we were just passing NULL instead. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
0e747f2029
commit
786d735d94
@ -207,7 +207,7 @@ virshReconnect(vshControl *ctl)
|
|||||||
vshError(ctl, "%s", _("failed to connect to the hypervisor"));
|
vshError(ctl, "%s", _("failed to connect to the hypervisor"));
|
||||||
} else {
|
} else {
|
||||||
if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
|
if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
|
||||||
NULL, NULL) < 0)
|
ctl, NULL) < 0)
|
||||||
vshError(ctl, "%s", _("Unable to register disconnect callback"));
|
vshError(ctl, "%s", _("Unable to register disconnect callback"));
|
||||||
if (connected)
|
if (connected)
|
||||||
vshError(ctl, "%s", _("Reconnected to the hypervisor"));
|
vshError(ctl, "%s", _("Reconnected to the hypervisor"));
|
||||||
@ -294,7 +294,7 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
|
if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
|
||||||
NULL, NULL) < 0)
|
ctl, NULL) < 0)
|
||||||
vshError(ctl, "%s", _("Unable to register disconnect callback"));
|
vshError(ctl, "%s", _("Unable to register disconnect callback"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user