Re: [PATCH spice-gtk] display: Lower level of warning for empty monitor config

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

 



Hi Frediano,

On Fri, 2016-03-11 at 05:37 -0500, Frediano Ziglio wrote:
> > 
> > 
> > Related:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1061942
> Not so important but I'll put some more information on the
> message. Would make easier to understand if somebody looks
> at the change without opening an external website.
> 
sure

> I think you can close the bug once this get into master.
> 
> Thinking that this is a not common situation but possible
> (like turning off all monitors) would not be good to avoid
> the return and set all monitors to not available?

I'll try, have to check how remote-viewer reacts to zero size displays
(make sure it will disconnect the client).

> However this is a different improvement that has nothing
> to do with this commit. Also you would have to take into
> consideration how a remote machine with all switched off
> monitor should be displayed on the client.

Right, as you said.

> 
> Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> 
> Frediano
> 

To be honest I don't think that this is the fix for the bug. But I
don't see a reason for client to keep printing these warnings all the
time - because the client can do nothing about receiving the message -
it is a problem / special  of the server / guest and not a programming
error (as g_return suggests).

Also notice a different behavior of kms and ums guest when running the
command `xrandr --output Virtual-0 --off`

ums shrinks the display to minimal size
kms freezes the display

Also the message arrives 4 times in a row, so I think that something is
not "optimal" in the guest.

Thanks for your suggestions,

Pavel
> 
> > 
> > ---
> >  src/channel-display.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/channel-display.c b/src/channel-display.c
> > index 5111d3d..dc00c31 100644
> > --- a/src/channel-display.c
> > +++ b/src/channel-display.c
> > @@ -1844,7 +1844,11 @@ static void
> > display_handle_monitors_config(SpiceChannel *channel, SpiceMsgIn
> > *in
> >      guint i;
> >  
> >      g_return_if_fail(config != NULL);
> > -    g_return_if_fail(config->count > 0);
> > +
> > +    if (config->count == 0) {
> > +        CHANNEL_DEBUG(channel, "received empty monitor config");
> > +        return;
> > +    }
> >  
> >      CHANNEL_DEBUG(channel, "received new monitors config from
> > guest: n:
> >      %d/%d", config->count, config->max_allowed);
> >  
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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