summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-26 12:34:01 +0100
committerHans de Goede <hdegoede@redhat.com>2013-04-09 13:12:07 +0200
commit0c0c94b7d7898feb4bb33caf383242ef26b62d09 (patch)
tree279c6885d4146c235dd10b19a41bd2bb29888ee6
parent0b81c90deaa51c6233b911e35a6adff29c3643f9 (diff)
channel-main: Don't g_warn when not finding a file-xfer-id
Since the agent channel can have a significant latency, it is possible for a cancel send from the client to the agent and a status message from the agent to cross each other. If this happens then the file-xfer will no longer be on the list. Printing a g_warning on this (rare but triggerable) condition will only get us hard to debug bug reports, so turn it into a SPICE_DEBUG. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--gtk/channel-main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 01c0659..11cd0f9 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1704,8 +1704,10 @@ static void file_xfer_handle_status(SpiceMainChannel *channel,
l = g_list_find_custom(c->file_xfer_task_list, &msg->id,
file_xfer_task_find);
-
- g_return_if_fail(l != NULL);
+ if (l == NULL) {
+ SPICE_DEBUG("cannot find task %d", msg->id);
+ return;
+ }
task = l->data;
SPICE_DEBUG("task %d received response %d", msg->id, msg->result);