[Spice-devel,v3,16/17] sound: Use default disconnect for client channels

Submitted by Frediano Ziglio on Nov. 29, 2016, 2:57 p.m.

Details

Message ID 75e771cf2849d68396b5f361585bd7068eaf7873.1480431431.git-series.fziglio@redhat.com
State Accepted
Headers show
Series "Remove DummyChannel* objects" ( rev: 4 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 29, 2016, 2:57 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/sound.c | 21 ---------------------
 1 file changed, 21 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/sound.c b/server/sound.c
index 2560596..654a06a 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -804,25 +804,6 @@  snd_channel_client_release_recv_buf(RedChannelClient *rcc, uint16_t type, uint32
     }
 }
 
-// TODO remove and just use red_channel_client_disconnect ??
-static void snd_disconnect_channel_client(RedChannelClient *rcc)
-{
-    SndChannel *channel;
-    RedChannel *red_channel = red_channel_client_get_channel(rcc);
-    uint32_t type;
-
-    spice_assert(red_channel);
-    channel = SND_CHANNEL(red_channel);
-    spice_assert(channel);
-    g_object_get(red_channel, "channel-type", &type, NULL);
-
-    spice_debug("channel-type=%d", type);
-    if (channel->connection) {
-        spice_assert(RED_CHANNEL_CLIENT(channel->connection) == rcc);
-        red_channel_client_disconnect(rcc);
-    }
-}
-
 static void snd_set_command(SndChannelClient *client, uint32_t command)
 {
     if (!client) {
@@ -1466,7 +1447,6 @@  playback_channel_constructed(GObject *object)
     G_OBJECT_CLASS(playback_channel_parent_class)->constructed(object);
 
     client_cbs.connect = snd_set_playback_peer;
-    client_cbs.disconnect = snd_disconnect_channel_client;
     client_cbs.migrate = snd_playback_migrate_channel_client;
     red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, self);
 
@@ -1517,7 +1497,6 @@  record_channel_constructed(GObject *object)
     G_OBJECT_CLASS(record_channel_parent_class)->constructed(object);
 
     client_cbs.connect = snd_set_record_peer;
-    client_cbs.disconnect = snd_disconnect_channel_client;
     client_cbs.migrate = snd_record_migrate_channel_client;
     red_channel_register_client_cbs(RED_CHANNEL(self), &client_cbs, self);