[Spice-devel] [spice-gtk v1] channel-main: make debug helpful in case of failures
Victor Toso
victortoso at redhat.com
Sat Aug 6 15:09:49 UTC 2016
Debug should come before the g_return_if_fail() otherwise we lose
important debug data.
---
src/channel-main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/channel-main.c b/src/channel-main.c
index 3f91a43..a074928 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);
--
2.7.4
More information about the Spice-devel
mailing list