[spice-gtk v4 07/24] main: to let SpiceFileTransferTask handle errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* spice_file_transfer_task_read_async() will call the callback with
  error in case it is called on pending state

* on VD_AGENT_FILE_XFER_STATUS_SUCCESS it should not be possible to be
  on pending state as spice_file_transfer_task_read_async() would
  return immediately in case all file is read
---
 src/channel-main.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/channel-main.c b/src/channel-main.c
index 9787613..4b728fe 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1993,11 +1993,6 @@ static void spice_file_transfer_task_handle_status(SpiceFileTransferTask *task,
 
     switch (msg->result) {
     case VD_AGENT_FILE_XFER_STATUS_CAN_SEND_DATA:
-        if (task->pending) {
-            error = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
-                           "transfer received CAN_SEND_DATA in pending state");
-            break;
-        }
         spice_file_transfer_task_read_async(task, file_xfer_read_async_cb, NULL);
         return;
     case VD_AGENT_FILE_XFER_STATUS_CANCELLED:
@@ -2009,9 +2004,6 @@ static void spice_file_transfer_task_handle_status(SpiceFileTransferTask *task,
                             "some errors occurred in the spice agent");
         break;
     case VD_AGENT_FILE_XFER_STATUS_SUCCESS:
-        if (task->pending)
-            error = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
-                                "transfer received success in pending state");
         break;
     default:
         g_warn_if_reached();
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]