[Spice-devel] [PATCH 01/15] Change spice_server_set_ticket() to use local 'reds'

Pavel Grunt pgrunt at redhat.com
Thu Jan 21 23:48:06 PST 2016


Hi,

I was thinking about it and the assert also checks for us if there are
more instances of SpiceServer. I would postponed these patches till
other global variables are removed/moved to reds.

Pavel

On Thu, 2016-01-21 at 16:16 +0000, Frediano Ziglio wrote:
> From: Jonathon Jongsma <jjongsma at redhat.com>
> 
> Rather than using global 'reds' variable
> ---
>  server/reds.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index f0087a8..84541e4 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3601,13 +3601,11 @@ SPICE_GNUC_VISIBLE void
> spice_server_set_uuid(SpiceServer *s, const uint8_t uuid
>      spice_uuid_is_set = TRUE;
>  }
>  
> -SPICE_GNUC_VISIBLE int spice_server_set_ticket(SpiceServer *s,
> +SPICE_GNUC_VISIBLE int spice_server_set_ticket(SpiceServer *reds,
>                                                 const char *passwd,
> int lifetime,
>                                                 int
> fail_if_connected,
>                                                 int
> disconnect_if_connected)
>  {
> -    spice_assert(reds == s);
> -
>      if (reds_main_channel_connected(reds)) {
>          if (fail_if_connected) {
>              return -1;


More information about the Spice-devel mailing list