virshCatchDisconnect expects ctl, but we were just passing NULL instead.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
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"));
}
if (virConnectRegisterCloseCallback(priv->conn, virshCatchDisconnect,
- NULL, NULL) < 0)
+ ctl, NULL) < 0)
vshError(ctl, "%s", _("Unable to register disconnect callback"));
return true;