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_v2 2/6] android/health: Perform clean up on app unregister call
Date: Mon, 16 Jun 2014 18:01:36 +0300 [thread overview]
Message-ID: <1402930900-24209-3-git-send-email-ravikumar.veeramally@linux.intel.com> (raw)
In-Reply-To: <1402930900-24209-1-git-send-email-ravikumar.veeramally@linux.intel.com>
---
android/health.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/android/health.c b/android/health.c
index 4bad7c4..59a97c0 100644
--- a/android/health.c
+++ b/android/health.c
@@ -266,10 +266,21 @@ fail:
static void bt_health_unregister_app(const void *buf, uint16_t len)
{
- DBG("Not implemented");
+ const struct hal_cmd_health_unreg_app *cmd = buf;
+ struct health_app *app;
+
+ DBG("");
+
+ app = queue_remove_if(apps, app_by_app_id, INT_TO_PTR(cmd->app_id));
+ if (!app) {
+ ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HEALTH,
+ HAL_OP_HEALTH_UNREG_APP, HAL_STATUS_INVALID);
+ return;
+ }
- ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HEALTH, HAL_OP_HEALTH_UNREG_APP,
- HAL_STATUS_UNSUPPORTED);
+ free_health_app(app);
+ ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HEALTH,
+ HAL_OP_HEALTH_UNREG_APP, HAL_STATUS_SUCCESS);
}
static void bt_health_connect_channel(const void *buf, uint16_t len)
--
1.9.1
next prev parent reply other threads:[~2014-06-16 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 15:01 [PATCH_v2 0/6] HDP initial implementaion Ravi kumar Veeramally
2014-06-16 15:01 ` [PATCH_v2 1/6] android/health: Cache health application data on app register call Ravi kumar Veeramally
2014-06-16 15:01 ` Ravi kumar Veeramally [this message]
2014-06-16 15:01 ` [PATCH_v2 3/6] android/health: Add HDP SDP record Ravi kumar Veeramally
2014-06-16 15:01 ` [PATCH_v2 4/6] android/health: Notify application registration status Ravi kumar Veeramally
2014-06-16 15:01 ` [PATCH_v2 5/6] android/health: Notify application deregistration status Ravi kumar Veeramally
2014-06-16 15:01 ` [PATCH_v2 6/6] profile/health: Free sdp list after adding it to record Ravi kumar Veeramally
2014-06-16 16:41 ` [PATCH_v2 0/6] HDP initial implementaion Szymon Janc
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=1402930900-24209-3-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