]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: virsh: Reset error when keepalive registration fails
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Nov 2020 13:31:57 +0000 (14:31 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 13 Nov 2020 10:12:30 +0000 (11:12 +0100)
commitd2d23aa2a6a605ad9bb838033681e4ead51b959a
treea976546d52775fa5d353555e0a7927beab5d5472
parenta1ed7f37ce7a8c4e523e70bb515381cac3ee4fc0
tools: virsh: Reset error when keepalive registration fails

We try to enable keepalive oportunistically. If it's not supported by
the connection driver and it was not explicitly requested we keep the
error object set and can report it in some cases accidentally:

 --- stdout ---
 TEST: /home/pipo/libvirt/tests/virsh-self-test
       !                                        1   FAILED
 --- stderr ---
 error: parameter 'target' of command 'attach-disk' must be listed before optional parameters
 error: this function is not supported by the connection driver: virConnectSetKeepAlive
 -------

Clear the stored libvirt error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh.c