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 3/5] android/health: Fix do not set mdl callbacks on mcl_reconneced call back
Date: Mon, 30 Jun 2014 18:31:52 +0300 [thread overview]
Message-ID: <1404142314-20795-4-git-send-email-ravikumar.veeramally@linux.intel.com> (raw)
In-Reply-To: <1404142314-20795-1-git-send-email-ravikumar.veeramally@linux.intel.com>
MDL related callbacks should be already set when creating mcl. Only
update connection status.
---
android/health.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/android/health.c b/android/health.c
index 7518dad..0327542 100644
--- a/android/health.c
+++ b/android/health.c
@@ -2001,16 +2001,17 @@ static void mcl_connected(struct mcap_mcl *mcl, gpointer data)
static void mcl_reconnected(struct mcap_mcl *mcl, gpointer data)
{
- GError *gerr = NULL;
- bool ret;
+ struct health_device *dev;
DBG("");
- ret = set_mcl_cb(mcl, NULL, &gerr);
- if (!ret) {
- error("health: error setting mcl callbacks: %s", gerr->message);
- g_error_free(gerr);
+ dev = search_dev_by_mcl(mcl);
+ if (!dev) {
+ error("device data does not exists");
+ return;
}
+
+ dev->mcl_conn = true;
}
static void mcl_disconnected(struct mcap_mcl *mcl, gpointer data)
--
1.9.1
next prev parent reply other threads:[~2014-06-30 15:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 15:31 [PATCH 0/5] Implement disconenct and reconnect Ravi kumar Veeramally
2014-06-30 15:31 ` [PATCH 1/5] android/health: Implement mcl_disconnected cb Ravi kumar Veeramally
2014-06-30 15:31 ` [PATCH 2/5] android/health: Implement mcl_uncached callback Ravi kumar Veeramally
2014-06-30 15:31 ` Ravi kumar Veeramally [this message]
2014-06-30 15:31 ` [PATCH 4/5] android/health: Implement MDL reconnection from remote device Ravi kumar Veeramally
2014-06-30 16:36 ` Szymon Janc
2014-06-30 15:31 ` [PATCH 5/5] android/health: Update PTS result Ravi kumar Veeramally
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=1404142314-20795-4-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