linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Subject: [PATCH 07/10] android/pan: Fix missing cleanup calls
Date: Wed, 11 Dec 2013 12:13:42 +0200	[thread overview]
Message-ID: <1386756825-934-8-git-send-email-ravikumar.veeramally@linux.intel.com> (raw)
In-Reply-To: <1386756825-934-1-git-send-email-ravikumar.veeramally@linux.intel.com>

---
 android/pan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/android/pan.c b/android/pan.c
index a9557a0..1ed7b04 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -128,6 +128,8 @@ static gboolean bnep_watchdog_cb(GIOChannel *chan, GIOCondition cond,
 
 	DBG("%s disconnected", dev->iface);
 
+	bnep_if_down(dev->iface);
+	bnep_conndel(&dev->dst);
 	bt_pan_notify_conn_state(dev, HAL_PAN_STATE_DISCONNECTED);
 	pan_device_free(dev);
 
@@ -142,6 +144,7 @@ static void bnep_conn_cb(GIOChannel *chan, char *iface, int err, void *data)
 
 	if (err < 0) {
 		error("bnep connect req failed: %s", strerror(-err));
+		bnep_conndel(&dev->dst);
 		bt_pan_notify_conn_state(dev, HAL_PAN_STATE_DISCONNECTED);
 		pan_device_free(dev);
 		return;
-- 
1.8.3.2


  parent reply	other threads:[~2013-12-11 10:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 10:13 [PATCH 00/10] Refactoring bnep code to reduce redundancy Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 01/10] bnep: Rename bnep_kill_connection to bnep_conndel Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 02/10] bnep: Rename send ctrl_rsp and make it global Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 03/10] bnep: Move bnep related calls to bnep.h|c Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 04/10] profiles/network/server: Delete function which does nothing Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 05/10] profiles/network: Move pan sdp record function bnep and make it global Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 06/10] android/pan: Remove channel unref which causing disconnection Ravi kumar Veeramally
2013-12-11 10:13 ` Ravi kumar Veeramally [this message]
2013-12-11 10:13 ` [PATCH 08/10] android/pan: Fix minor white space Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 09/10] android/pan: Free connected pan devices on profile unregister call Ravi kumar Veeramally
2013-12-11 10:13 ` [PATCH 10/10] android/pan: Add PAN NAP sdp record fo server role Ravi kumar Veeramally
2013-12-11 13:33 ` [PATCH 00/10] Refactoring bnep code to reduce redundancy 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=1386756825-934-8-git-send-email-ravikumar.veeramally@linux.intel.com \
    --to=ravikumar.veeramally@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).