Diff between b15f60631266d801fec6d8fdb3d4b3efee90b046 and bc66f33f63afb16b2e37879bb9e0dfc260c3a457

Changed Files

File Additions Deletions Status
audio/gateway.c +6 -9 modified

Full Patch

diff --git a/audio/gateway.c b/audio/gateway.c
index 77aec59..e9485d0 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -158,16 +158,13 @@ static gboolean sco_io_cb(GIOChannel *chan, GIOCondition cond,
 	if (cond & G_IO_NVAL)
 		return FALSE;
 
-	if (cond & (G_IO_ERR | G_IO_HUP)) {
-		DBG("sco connection is released");
-		g_io_channel_shutdown(gw->sco, TRUE, NULL);
-		g_io_channel_unref(gw->sco);
-		gw->sco = NULL;
-		change_state(dev, GATEWAY_STATE_CONNECTED);
-		return FALSE;
-	}
+	DBG("sco connection is released");
+	g_io_channel_shutdown(gw->sco, TRUE, NULL);
+	g_io_channel_unref(gw->sco);
+	gw->sco = NULL;
+	change_state(dev, GATEWAY_STATE_CONNECTED);
 
-	return TRUE;
+	return FALSE;
 }
 
 static void sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)