[Spice-devel] [PATCH spice] Do not discard monitor config messages if agent is disconnected
Christophe Fergeau
cfergeau at redhat.com
Tue Apr 8 09:08:31 PDT 2014
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?
> 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 :(
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/20140408/474388e2/attachment.sig>
More information about the Spice-devel
mailing list