mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-03 11:59:15 +00:00
file-xfer: inform agent of errors only when task finished
No need to inform of a problem under spice_file_transfer_task_completed() as the task will be finalized and we can send the error to the agent there. This change is related to split SpiceFileTransferTask from channel-main. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
b26818d0e0
commit
2bb8e732fd
@ -2991,16 +2991,6 @@ static void spice_file_transfer_task_completed(SpiceFileTransferTask *self,
|
||||
self->error = error;
|
||||
}
|
||||
|
||||
if (self->error) {
|
||||
VDAgentFileXferStatusMessage msg = {
|
||||
.id = self->id,
|
||||
.result = self->error->code == G_IO_ERROR_CANCELLED ?
|
||||
VD_AGENT_FILE_XFER_STATUS_CANCELLED : VD_AGENT_FILE_XFER_STATUS_ERROR,
|
||||
};
|
||||
agent_msg_queue_many(self->channel, VD_AGENT_FILE_XFER_STATUS,
|
||||
&msg, sizeof(msg), NULL);
|
||||
}
|
||||
|
||||
if (self->pending) {
|
||||
/* Complete but pending is okay only if error is set */
|
||||
if (self->error == NULL) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user