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

Marc-André Lureau mlureau at redhat.com
Tue Apr 8 09:15:09 PDT 2014



----- 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?

> 
> > 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..

> Christophe
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list