Re: [PATCH spice-gtk] Replace spice_printerr() with g_warning()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Thu, Jun 28, 2018 at 04:38:21PM +0100, Frediano Ziglio wrote:
> > The remaining occurrences of spice_printerr() are warnings when
> > something unexpected happens, they can be replaced with g_warning() so
> > that users of spice-server can redirect them with
> > g_log_set_default_handler().
> 
> Maybe squash this in?
> 
> Either way, Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>
> 

I can do a follow up but IMO they don't see to help much, surely
is the display channel and knowing the id of which one means
that you have multiple video running on the same VM.
I mean, looks like a peculiar situation you don't want to
have so many detail in the normal case...

> diff --git a/src/channel-display.c b/src/channel-display.c
> index 44ba0439..1c28aed1 100644
> --- a/src/channel-display.c
> +++ b/src/channel-display.c
> @@ -1211,7 +1211,7 @@ static void report_invalid_stream(SpiceChannel
> *channel, uint32_t id)
>          /* Send a special stream report (UINT_MAX dropped frames out of
>          zero)
>           * to indicate there is no such stream.
>           */
> -        g_warning("notify the server that stream %u does not exist", id);
> +        g_warning("%s: notify the server that stream %u does not exist",
> channel->priv->name, id);
>          memset(&report, 0, sizeof(report));
>          report.stream_id = id;
>          report.num_frames = 0;
> @@ -1269,7 +1269,8 @@ static display_stream
> *display_stream_create(SpiceChannel *channel,
>          break;
>      }
>      if (st->video_decoder == NULL) {
> -        g_warning("could not create a video decoder for codec %u",
> codec_type);
> +        g_warning("%s: could not create a video decoder for codec %u",
> +                  channel->priv->name, codec_type);
>          g_clear_pointer(&st, display_stream_destroy);
>      }
>      return st;
> @@ -1310,7 +1311,7 @@ static void display_handle_stream_create(SpiceChannel
> *channel, SpiceMsgIn *in)
>                                                 op->flags, op->codec_type,
>                                                 &op->dest, &op->clip);
>      if (c->streams[op->id] == NULL) {
> -        g_warning("could not create the %u video stream", op->id);
> +        g_warning("%s: could not create the %u video stream",
> channel->priv->name, op->id);
>          destroy_stream(channel, op->id);
>          report_invalid_stream(channel, op->id);
>      }
> 
> 
...

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]