[Spice-devel] [PATCH spice-gtk 4/4] channel: get rid of connection_id, available from session

Christophe Fergeau cfergeau at redhat.com
Mon Nov 18 02:01:14 PST 2013


On Fri, Nov 15, 2013 at 10:03:42PM +0100, Marc-André Lureau wrote:
> ---
>  gtk/spice-channel-priv.h | 1 -
>  gtk/spice-channel.c      | 5 ++---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h
> index 80a6563..351126f 100644
> --- a/gtk/spice-channel-priv.h
> +++ b/gtk/spice-channel-priv.h
> @@ -113,7 +113,6 @@ struct _SpiceChannelPrivate {
>      guint                       channel_watch;
>      int                         tls;
>  
> -    int                         connection_id;
>      int                         channel_id;
>      int                         channel_type;
>      SpiceLinkHeader             link_hdr;
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 41d5eab..901c193 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -123,14 +123,13 @@ static void spice_channel_constructed(GObject *gobject)
>      const char *desc = spice_channel_type_to_string(c->channel_type);
>  
>      snprintf(c->name, sizeof(c->name), "%s-%d:%d",
> -             desc ? desc : "unknown", c->channel_type, c->channel_id);
> +             desc, c->channel_type, c->channel_id);
>      CHANNEL_DEBUG(channel, "%s", __FUNCTION__);

This hunk seems to be unrelated.

Rest looks good, ACK.

Christophe

>  
>      const char *disabled  = g_getenv("SPICE_DISABLE_CHANNELS");
>      if (disabled && strstr(disabled, desc))
>          c->disable_channel_msg = TRUE;
>  
> -    c->connection_id = spice_session_get_connection_id(c->session);
>      spice_session_channel_new(c->session, channel);
>  
>      /* Chain up to the parent class */
> @@ -1136,7 +1135,7 @@ static void spice_channel_send_link(SpiceChannel *channel)
>          return;
>      }
>  
> -    c->link_msg.connection_id = c->connection_id;
> +    c->link_msg.connection_id = spice_session_get_connection_id(c->session);
>      c->link_msg.channel_type  = c->channel_type;
>      c->link_msg.channel_id    = c->channel_id;
>      c->link_msg.caps_offset   = sizeof(c->link_msg);
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20131118/fd191425/attachment.pgp>


More information about the Spice-devel mailing list