[Spice-devel] [PATCH spice] Do not discard monitor config messages if agent is disconnected

Christophe Fergeau cfergeau at redhat.com
Wed Apr 16 07:25:10 PDT 2014


On Tue, Apr 08, 2014 at 12:15:09PM -0400, Marc-André Lureau wrote:
> 
> 
> ----- Original Message -----
> > On Mon, Apr 07, 2014 at 02:17:24PM +0200, Marc-André Lureau wrote:
> > > VD_AGENT_MONITORS_CONFIG messages can be processed if
> > > red_dispatcher_use_client_monitors_config().
> > > 
> > > A token must be returned to the client to keep sending agent messages.
> > > 
> > > This solves reconfiguration of monitor with DRM/KMS device when the
> > 
> > What is 'reconfiguration' of monitor?
> 
> auto-config? mutter to follow the preferred resolution?

automatic resolution change then ?

> 
> > 
> > > agent is not running.
> > > ---
> > >  server/agent-msg-filter.c | 13 +++++--------
> > >  server/reds.c             |  5 +++--
> > >  2 files changed, 8 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/server/agent-msg-filter.c b/server/agent-msg-filter.c
> > > index 567e03d..f53fd9a 100644
> > > --- a/server/agent-msg-filter.c
> > > +++ b/server/agent-msg-filter.c
> > > @@ -68,7 +68,11 @@ data_to_read:
> > >          return AGENT_MSG_FILTER_PROTO_ERROR;
> > >      }
> > >  
> > > -    if (filter->discard_all) {
> > > +
> > > +    if (msg_header.type == VD_AGENT_MONITORS_CONFIG &&
> > > +        red_dispatcher_use_client_monitors_config()) {
> > > +        filter->result = AGENT_MSG_FILTER_MONITORS_CONFIG;
> > > +    } else if (filter->discard_all) {
> > 
> > discard_all becomes discard_almost_all after this change, but is still
> > called discard_all, this makes things even less obvious than they already
> > are :(
> 
> Yeah, I am not sure we want to go this way either. It was perhaps not
> such a good idea to reuse existing agent messages, when they have a
> different control flow than the rest of main channel messages.
> 
> I'd keep this aside for now..

Reluctant ACK.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140416/5fc9288f/attachment.sig>


More information about the Spice-devel mailing list