linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Subject: [PATCH 2/2] Minor style fix in audio/gateway.c
Date: Thu,  4 Aug 2011 15:31:14 +0200	[thread overview]
Message-ID: <1312464674-18828-2-git-send-email-frederic.dalleau@linux.intel.com> (raw)
In-Reply-To: <1312464674-18828-1-git-send-email-frederic.dalleau@linux.intel.com>

---
 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


  reply	other threads:[~2011-08-04 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 13:31 [PATCH 1/2] Add watch for RFCOMM disconnect to HFP HF role Frédéric Dalleau
2011-08-04 13:31 ` Frédéric Dalleau [this message]
2011-08-05  9:20 ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312464674-18828-2-git-send-email-frederic.dalleau@linux.intel.com \
    --to=frederic.dalleau@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).