[Spice-devel] [spice-gtk v1] channel-main: make debug helpful in case of failures
Jonathon Jongsma
jjongsma at redhat.com
Tue Aug 9 15:45:21 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Sat, 2016-08-06 at 17:09 +0200, Victor Toso wrote:
> 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);
More information about the Spice-devel
mailing list