All of lore.kernel.org
 help / color / mirror / Atom feed
From: jaikumar@google.com
To: linux-bluetooth@vger.kernel.org
Cc: Jaikumar Ganesh <jaikumar@google.com>
Subject: [PATCH] Fix control channel shutdown in case of errors.
Date: Fri,  4 Feb 2011 13:51:45 -0800	[thread overview]
Message-ID: <1296856305-54896-1-git-send-email-jaikumar@google.com> (raw)

From: Jaikumar Ganesh <jaikumar@google.com>

When there are connection errors, like host is down, when
establishing the control channel connection, the control io
channel was not being shutdown. This will cause future
connections to fail.
---
 input/device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/input/device.c b/input/device.c
index 5cb57ea..21f8329 100644
--- a/input/device.c
+++ b/input/device.c
@@ -856,6 +856,7 @@ static void control_connect_cb(GIOChannel *chan, GError *conn_err,
 		error("%s", conn_err->message);
 		reply = btd_error_failed(iconn->pending_connect,
 						conn_err->message);
+		g_io_channel_shutdown(chan, TRUE, NULL);
 		goto failed;
 	}
 
-- 
1.7.3.1


             reply	other threads:[~2011-02-04 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04 21:51 jaikumar [this message]
2011-02-07 23:41 ` [PATCH] Fix control channel shutdown in case of errors 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=1296856305-54896-1-git-send-email-jaikumar@google.com \
    --to=jaikumar@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.