[PATCH spice-gtk 8/9] channel: remove unused ChannelClass::channel_disconnect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This virtual method turns out to be unnecessary anymore, and
was never override. channel_reset() is enough.
---
 gtk/spice-channel.c | 19 -------------------
 gtk/spice-channel.h |  2 +-
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 0d5e5e7..95eb615 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -51,7 +51,6 @@
 static void spice_channel_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
 static void spice_channel_write_msg(SpiceChannel *channel, SpiceMsgOut *out);
 static void spice_channel_send_link(SpiceChannel *channel);
-static void channel_disconnect(SpiceChannel *channel);
 static void channel_reset(SpiceChannel *channel, gboolean migrating);
 static void spice_channel_reset_capabilities(SpiceChannel *channel);
 static void spice_channel_send_migration_handshake(SpiceChannel *channel);
@@ -270,7 +269,6 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
 
     klass->iterate_write = spice_channel_iterate_write;
     klass->iterate_read  = spice_channel_iterate_read;
-    klass->channel_disconnect = channel_disconnect;
     klass->channel_reset = channel_reset;
 
     gobject_class->constructed  = spice_channel_constructed;
@@ -2643,23 +2641,6 @@ void spice_channel_reset(SpiceChannel *channel, gboolean migrating)
     SPICE_CHANNEL_GET_CLASS(channel)->channel_reset(channel, migrating);
 }
 
-/* system or coroutine context */
-static void channel_disconnect(SpiceChannel *channel)
-{
-    SpiceChannelPrivate *c = channel->priv;
-
-    g_return_if_fail(c != NULL);
-
-    if (c->state == SPICE_CHANNEL_STATE_UNCONNECTED)
-        return;
-
-    c->has_error = TRUE; /* break the loop */
-
-    spice_channel_reset(channel, FALSE);
-
-    g_return_if_fail(SPICE_IS_CHANNEL(channel));
-}
-
 /**
  * spice_channel_disconnect:
  * @channel:
diff --git a/gtk/spice-channel.h b/gtk/spice-channel.h
index 8d07383..7f132f6 100644
--- a/gtk/spice-channel.h
+++ b/gtk/spice-channel.h
@@ -86,7 +86,7 @@ struct _SpiceChannelClass
 
     /*< private >*/
     /* virtual method, any context */
-    void (*channel_disconnect)(SpiceChannel *channel);
+    gpointer deprecated;
     void (*channel_reset)(SpiceChannel *channel, gboolean migrating);
     void (*channel_reset_capabilities)(SpiceChannel *channel);
 
-- 
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]