From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 03/10] android: Use ipc_send_rsp helper for replying success
Date: Thu, 28 Nov 2013 15:15:23 +0100 [thread overview]
Message-ID: <1385648130-12808-3-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1385648130-12808-1-git-send-email-szymon.janc@tieto.com>
Where applicable use helper as this make code easier to understand.
---
android/bluetooth.c | 2 +-
android/main.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 716c0eb..b5fd644 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -2263,7 +2263,7 @@ void bt_bluetooth_handle_cmd(int sk, uint8_t opcode, void *buf, uint16_t len)
goto error;
}
- ipc_send(sk, HAL_SERVICE_ID_BLUETOOTH, opcode, 0, NULL, -1);
+ ipc_send_rsp(HAL_SERVICE_ID_BLUETOOTH, opcode, HAL_STATUS_SUCCESS);
return;
error:
diff --git a/android/main.c b/android/main.c
index 6fe0d1c..211503b 100644
--- a/android/main.c
+++ b/android/main.c
@@ -115,8 +115,8 @@ static void service_register(void *buf, uint16_t len)
services[m->service_id] = true;
- ipc_send(g_io_channel_unix_get_fd(hal_cmd_io), HAL_SERVICE_ID_CORE,
- HAL_OP_REGISTER_MODULE, 0, NULL, -1);
+ ipc_send_rsp(HAL_SERVICE_ID_CORE, HAL_OP_REGISTER_MODULE,
+ HAL_STATUS_SUCCESS);
info("Service ID=%u registered", m->service_id);
return;
@@ -157,8 +157,8 @@ static void service_unregister(void *buf, uint16_t len)
services[m->service_id] = false;
- ipc_send(g_io_channel_unix_get_fd(hal_cmd_io), HAL_SERVICE_ID_CORE,
- HAL_OP_UNREGISTER_MODULE, 0, NULL, -1);
+ ipc_send_rsp(HAL_SERVICE_ID_CORE, HAL_OP_UNREGISTER_MODULE,
+ HAL_STATUS_SUCCESS);
info("Service ID=%u unregistered", m->service_id);
return;
--
1.8.3.2
next prev parent reply other threads:[~2013-11-28 14:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 14:15 [PATCH 01/10] android: Initialize IPC with command and notification sockets Szymon Janc
2013-11-28 14:15 ` [PATCH 02/10] android: Remove socket parameter from ipc_send_rsp Szymon Janc
2013-11-28 14:15 ` Szymon Janc [this message]
2013-11-28 14:15 ` [PATCH 04/10] android: Add IPC helper for sending notifications Szymon Janc
2013-11-28 14:15 ` [PATCH 05/10] android: Use ipc_send_notif " Szymon Janc
2013-11-28 14:15 ` [PATCH 06/10] android: Add ipc_send_rsp_full IPC helper Szymon Janc
2013-11-28 14:15 ` [PATCH 07/10] android/socket: Use " Szymon Janc
2013-11-28 14:15 ` [PATCH 08/10] android: Make ipc_send static Szymon Janc
2013-11-28 14:15 ` [PATCH 09/10] android/bluetooth: Remove not needed notification_sk checks Szymon Janc
2013-11-28 14:15 ` [PATCH 10/10] android: Don't pass notification socket on services register Szymon Janc
2013-11-28 16:06 ` [PATCH 01/10] android: Initialize IPC with command and notification sockets Luiz Augusto von Dentz
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=1385648130-12808-3-git-send-email-szymon.janc@tieto.com \
--to=szymon.janc@tieto.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