[Spice-devel] [PATCH spice-gtk 16/16] channel-main: Don't g_warn when not finding a file-xfer-id
Hans de Goede
hdegoede at redhat.com
Fri Mar 29 04:40:28 PDT 2013
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 at redhat.com>
---
gtk/channel-main.c | 6 ++++--
1 file 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);
--
1.8.1.4
More information about the Spice-devel
mailing list