From 1fcbc480665a4c97eac60f159991c53ae9fbfa61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= Date: Tue, 6 Sep 2011 15:55:48 +0200 Subject: [PATCH] Fix disconnect SCO at same time than RFCOMM If RFCOMM disconnects, SCO should be disconnected too. --- audio/gateway.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/audio/gateway.c b/audio/gateway.c index 142b12eb3..59c91dd86 100644 --- a/audio/gateway.c +++ b/audio/gateway.c @@ -222,15 +222,10 @@ static void sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) static gboolean rfcomm_disconnect_cb(GIOChannel *chan, GIOCondition cond, struct audio_device *dev) { - struct gateway *gw = dev->gateway; - if (cond & G_IO_NVAL) return FALSE; - g_io_channel_shutdown(gw->rfcomm, TRUE, NULL); - g_io_channel_unref(gw->rfcomm); - gw->rfcomm = NULL; - change_state(dev, GATEWAY_STATE_DISCONNECTED); + gateway_close(dev); return FALSE; } -- 2.47.3