[Spice-devel] [PATCH 14/15] Change reds_disconnect() to take RedsState arg
Frediano Ziglio
fziglio at redhat.com
Fri Jan 15 03:48:20 PST 2016
>
> From: Jonathon Jongsma <jjongsma at redhat.com>
>
> ---
> server/reds.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index 935819d..9b3c605 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -574,7 +574,7 @@ void reds_client_disconnect(RedsState *reds, RedClient
> *client)
>
> // TODO: go over all usage of reds_disconnect, most/some of it should be
> converted to
> // reds_client_disconnect
> -static void reds_disconnect(void)
> +static void reds_disconnect(RedsState *reds)
> {
> RingItem *link, *next;
>
> @@ -588,7 +588,7 @@ static void reds_disconnect(void)
> static void reds_mig_disconnect(void)
> {
> if (reds_main_channel_connected(reds)) {
> - reds_disconnect();
> + reds_disconnect(reds);
> } else {
> reds_mig_cleanup(reds);
> }
> @@ -1661,7 +1661,7 @@ static void reds_handle_main_link(RedLinkInfo *link)
>
> link_mess = link->link_mess;
> if (!reds->allow_multiple_clients) {
> - reds_disconnect();
> + reds_disconnect(reds);
> }
>
> if (link_mess->connection_id == 0) {
> @@ -2785,7 +2785,7 @@ static inline void on_activating_ticketing(void)
> {
> if (!ticketing_enabled && reds_main_channel_connected(reds)) {
> spice_warning("disconnecting");
> - reds_disconnect();
> + reds_disconnect(reds);
> }
> }
>
> @@ -3029,7 +3029,7 @@ static SpiceCharDeviceState
> *attach_to_red_agent(SpiceCharDeviceInstance *sin)
>
> if (!client_added) {
> spice_warning("failed to add client to agent");
> - reds_disconnect();
> + reds_disconnect(reds);
> }
> }
>
> @@ -3606,7 +3606,7 @@ SPICE_GNUC_VISIBLE int
> spice_server_set_ticket(SpiceServer *s,
> return -1;
> }
> if (disconnect_if_connected) {
> - reds_disconnect();
> + reds_disconnect(reds);
> }
> }
>
> @@ -3944,7 +3944,7 @@ SPICE_GNUC_VISIBLE int
> spice_server_migrate_end(SpiceServer *s, int completed)
> sif = SPICE_CONTAINEROF(migration_interface->base.sif,
> SpiceMigrateInterface, base);
> if (completed && !reds->expect_migrate && reds->num_clients) {
> spice_warning("spice_server_migrate_info was not called,
> disconnecting clients");
> - reds_disconnect();
> + reds_disconnect(reds);
> ret = -1;
> goto complete;
> }
Acked-by: Frediano Ziglio <fziglio at redhat.com>
Frediano
More information about the Spice-devel
mailing list