[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:28:26 PDT 2011
On Mon, Jul 18, 2011 at 05:51:30PM +0300, Alon Levy wrote:
> > ---
> > client/red_client.cpp | 28 ++++++++++++++++++++--------
> > 1 files changed, 20 insertions(+), 8 deletions(-)
> >
> > diff --git a/client/red_client.cpp b/client/red_client.cpp
> > index 8918e4f..edcdb02 100644
> > --- a/client/red_client.cpp
> > +++ b/client/red_client.cpp
> > @@ -966,19 +966,20 @@ void RedClient::handle_init(RedPeer::InMessage* message)
> > agent_start.num_tokens = ~0;
> > _marshallers->msgc_main_agent_start(msg->marshaller(), &agent_start);
> > post_message(msg);
> > - }
> > -
> > - if (_agent_connected) {
>
> Why do we want to send agent_announce_capabilities if !_agent_connected?
we don't, the old code was doing
if (_agent_connected) {
agent_start.num_tokens = ~0;
_marshallers->msgc_main_agent_start(msg->marshaller(), &agent_start);
post_message(msg);
}
if (_agent_connected) {
send_agent_announce_capabilities(true);
if (_auto_display_res) {
send_agent_monitors_config();
}
}
I merged the 2 blocks, unless I missed something there's no change as to
when the send_announce_capabilities() is called.
> > @@ -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 ..."
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/6c786986/attachment-0001.pgp>
More information about the Spice-devel
mailing list