[Spice-devel] [spice-gtk v4 09/24] main: do not check for xfer-task errors
Jonathon Jongsma
jjongsma at redhat.com
Fri Jun 24 19:30:09 UTC 2016
On Thu, 2016-06-23 at 19:37 +0200, Victor Toso wrote:
> file_xfer_flush_finish and file_xfer_data_flushed_cb are channel-main
> function and should not check for SpiceFileTransferTask internal
> errors.
OK, but I'd like some additional justification of why we can skip this without
causing problems. For example (as I understand it):
The data will only be flushed if spice_file_transfer_task_read_async() was
successful, and between the call to file_xfer_flush_async() and
file_xfer_data_flushed_cb(), the task status will not change
(or is it possible that the task status can be changed by recieving
a VD_AGENT_FILE_XFER_STATUS_ERROR message from the guest?)
> ---
> src/channel-main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/channel-main.c b/src/channel-main.c
> index be5a454..fef72cd 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -1893,7 +1893,7 @@ static void file_xfer_data_flushed_cb(GObject *source_object,
> GError *error = NULL;
>
> file_xfer_flush_finish(channel, res, &error);
> - if (error || self->error) {
> + if (error) {
> spice_file_transfer_task_completed(self, error);
> return;
> }
Reviewed-by: Jonathon Jongsma <jjongsma at redhat.com>
More information about the Spice-devel
mailing list