summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Toso <victortoso@redhat.com>2016-08-06 16:47:53 +0200
committerVictor Toso <victortoso@redhat.com>2016-08-10 09:58:51 +0200
commit2481df264d57b5992fc123cee57ed824465101aa (patch)
tree794b6eb34a3abd1187cf8876ef8e8e356a087dd8
parentcbfcaa8c82b4e1633f86c52019b45f6f58d92b3d (diff)
channel-main: make debug helpful in case of failures
Debug should come before the g_return_if_fail() otherwise we lose important debug data. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--src/channel-main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channel-main.c b/src/channel-main.c
index f3e666b..47e19e1 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1841,12 +1841,12 @@ static void main_agent_handle_xfer_status(SpiceMainChannel *channel,
FileTransferOperation *xfer_op;
GError *error = NULL;
+ SPICE_DEBUG("xfer-task %u received response %u", msg->id, msg->result);
+
xfer_task = spice_main_channel_find_xfer_task_by_task_id(channel, msg->id);
g_return_if_fail(xfer_task != NULL);
xfer_op = g_hash_table_lookup(channel->priv->file_xfer_tasks, GUINT_TO_POINTER(msg->id));
- SPICE_DEBUG("xfer-task %u received response %u", msg->id, msg->result);
-
switch (msg->result) {
case VD_AGENT_FILE_XFER_STATUS_CAN_SEND_DATA:
g_return_if_fail(spice_file_transfer_task_is_completed(xfer_task) == FALSE);