--- audio/gateway.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) 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) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html