[Spice-devel] [RFC v4 57/62] server/reds: add RedsState.allow_multiple_clients (temp - add accessors too)
Alon Levy
alevy at redhat.com
Mon May 2 23:40:35 PDT 2011
On Tue, May 03, 2011 at 01:53:53AM +0200, Marc-André Lureau wrote:
> On Tue, Apr 26, 2011 at 12:55 PM, Alon Levy <alevy at redhat.com> wrote:
> > ---
> > server/reds.c | 6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/server/reds.c b/server/reds.c
> > index 0ce6f1c..dc73202 100644
> > --- a/server/reds.c
> > +++ b/server/reds.c
> > @@ -228,6 +228,7 @@ typedef struct RedsState {
> > RedsStatValue roundtrip_stat;
> > #endif
> > int peer_minor_version;
> > + int allow_multiple_clients;
> > } RedsState;
> >
> > static RedsState *reds = NULL;
> > @@ -1498,7 +1499,9 @@ static void reds_handle_main_link(RedLinkInfo *link)
> >
> > red_printf("");
> > link_mess = link->link_mess;
> > - reds_disconnect();
> > + if (!reds->allow_multiple_clients) {
> > + reds_disconnect();
> > + }
> >
> > if (link_mess->connection_id == 0) {
> > reds_send_link_result(link, SPICE_LINK_ERR_OK);
> > @@ -3519,6 +3522,7 @@ static int do_spice_init(SpiceCoreInterface *core_interface)
> > #endif
> >
> > reds->mouse_mode = SPICE_MOUSE_MODE_SERVER;
> > + reds->allow_multiple_clients = 1;
>
> Without accessors (and qemu option), having an environment variable
> would be helpful. Something like:
>
> reds->allow_multiple_clients = getenv("SPICE_ALLOW_MC") != NULL.
>
Yes, sure - I'll do that, since the alternative is to patch qemu too, and that's
a little annoying possibly (requires two package changes). Actually, I think I'll
send the patch to qemu anyway (and first spice) to add the spice API, but leave
the environment variable too.
> I am also wondering if applying this patch earlier in the patch series
> would help to exercise iteratively the MC code before all the changes
> are applied (do you see what I mean?).
>
> > atexit(reds_exit);
> > return 0;
> >
> > --
> > 1.7.4.4
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> >
>
>
>
> --
> Marc-André Lureau
More information about the Spice-devel
mailing list