[Spice-devel] [PATCH 5/5] client: don't crash when agent is missing WAN support

Christophe Fergeau cfergeau at redhat.com
Mon Jul 18 08:58:14 PDT 2011


On Mon, Jul 18, 2011 at 06:43:31PM +0300, Alon Levy wrote:
> On Mon, Jul 18, 2011 at 05:28:26PM +0200, Christophe Fergeau wrote:
> > On Mon, Jul 18, 2011 at 05:51:30PM +0300, Alon Levy wrote:
> > > > @@ -1046,6 +1047,17 @@ void RedClient::on_agent_announce_capabilities(
> > > >          // not sending the color depth through send_agent_monitors_config, since
> > > >          // it applies only for attached screens.
> > > >          send_agent_display_config();
> > > > +    } else if (!_auto_display_res) {
> > > 
> > > Who sets _auto_display_res? does this affect windows guest agents? the comment
> > > below says linux but the test above seems to be not linux specific.
> > 
> > No idea, I added this test to mirror the
> >         if (_auto_display_res) {
> >            send_agent_monitors_config();
> >         }
> > in handle_init. This avoids changing behaviour when we decided to send the
> > monitors config in handle_init. If the comment is misleading, I can change
> > it, for example "Some agents don't support monitors/displays ..."
> 
> I didn't care about the comment, but about the behavior. I want to be sure
> this doesn't change the behavior for the windows agent.

In the windows case, we'll go through the 1st block:

if (VD_AGENT_HAS_CAPABILITY(caps->caps, caps_size,
            VD_AGENT_CAP_DISPLAY_CONFIG) && !_agent_disp_config_sent) {
        // not sending the color depth through send_agent_monitors_config,
        // sinc
        // it applies only for attached screens.
        send_agent_display_config();
}
The if (!_auto_display_res) test was added to avoid as much as possible
changing the old behaviour, we used to be waiting in this case, since we
sent a message in handle_init, it makes sense to still be waiting in this
case.


Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110718/57d50fe6/attachment.pgp>


More information about the Spice-devel mailing list