]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Fix checking for reconnect conditions
authorPeter Krempa <pkrempa@redhat.com>
Mon, 2 Jan 2012 16:07:31 +0000 (17:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 2 Jan 2012 17:01:09 +0000 (18:01 +0100)
commitd82c6bcf30bf0175fa7a0dff74afcebfce335f26
treeffbbcef4d93ecd56f04d421d0bdbc231393a5fae
parentf4384b8439923aef7b7ee00b6a330bff86cde905
virsh: Fix checking for reconnect conditions

virshReportError() function frees the most recent error reported from
libvirt. Condition that checks if connection to the daemon was broken
during last command was then limited to check for SIGPIPE signal not
taking into account possible errors signalized without SIGPIPE.

This patch moves the check before the error is freed, to take into
account code that does not emit SIGPIPE while failing.

* tools/virsh.c: - move check for broken connection before error print.
tools/virsh.c