提交 786d735d 编写于 作者: J Jiri Denemark

virsh: Pass ctl to virshCatchDisconnect

virshCatchDisconnect expects ctl, but we were just passing NULL instead.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 0e747f20
...@@ -207,7 +207,7 @@ virshReconnect(vshControl *ctl) ...@@ -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) ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册