]> xenbits.xensource.com Git - libvirt.git/commit
daemon: stream: Don't force error when client aborts
authorCole Robinson <crobinso@redhat.com>
Sun, 24 Apr 2016 20:28:18 +0000 (16:28 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 2 May 2016 14:13:05 +0000 (10:13 -0400)
commit66a03d0af2dbb8a5f8afc51a97ac8fd2895a0697
treef7109c8ba658cf545f9334947c0bfae8614f9d56
parent8958dde506bab3c854acd8b66d422406191bd3c9
daemon: stream: Don't force error when client aborts

Every time a client aborts a stream via the virStreamAbort API,
the daemon always logs an error like:

  error : daemonStreamHandleAbort:617 : stream aborted at client request

and that same error is returned to the client. Meaning virStreamAbort
always returns -1, which seems strange.

This reworks the error handling to only raise an error on virStreamAbort
if the actual server side abort call raises an error. This is similar
to how virStreamFinish works.

If the abort code path is triggered by an unexpected message type
then we continue to raise an unconditional error. Also drop a redundant
VIR_WARN call there, since virReportError will raise a VIR_ERROR anyways
daemon/stream.c