[Spice-devel] [spice-gtk v1] channel-main: make debug helpful in case of failures

Victor Toso victortoso at redhat.com
Wed Aug 10 08:04:31 UTC 2016


Hi,

On Tue, Aug 09, 2016 at 10:45:21AM -0500, Jonathon Jongsma wrote:
> Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

Pushed!
https://cgit.freedesktop.org/spice/spice-gtk/commit/?id=2481df264d57b5992fc123cee57ed824465101aa

Cheers,
  toso

>
>
> 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