From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH 10/10] android/ipc: Add support for sending FD in notifications
Date: Wed, 11 Jun 2014 16:32:52 +0200 [thread overview]
Message-ID: <1402497172-12436-11-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1402497172-12436-1-git-send-email-szymon.janc@tieto.com>
---
android/ipc.c | 8 +++++++-
android/ipc.h | 3 +++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/android/ipc.c b/android/ipc.c
index fc58a1c..2e67428 100644
--- a/android/ipc.c
+++ b/android/ipc.c
@@ -404,11 +404,17 @@ void ipc_send_rsp_full(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
void ipc_send_notif(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
uint16_t len, void *param)
{
+ return ipc_send_notif_with_fd(ipc, service_id, opcode, len, param, -1);
+}
+
+void ipc_send_notif_with_fd(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
+ uint16_t len, void *param, int fd)
+{
if (!ipc || !ipc->notif_io)
return;
ipc_send(g_io_channel_unix_get_fd(ipc->notif_io), service_id, opcode,
- len, param, -1);
+ len, param, fd);
}
void ipc_register(struct ipc *ipc, uint8_t service,
diff --git a/android/ipc.h b/android/ipc.h
index e97f0e6..fd2b985 100644
--- a/android/ipc.h
+++ b/android/ipc.h
@@ -42,6 +42,9 @@ void ipc_send_rsp_full(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
uint16_t len, void *param, int fd);
void ipc_send_notif(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
uint16_t len, void *param);
+void ipc_send_notif_with_fd(struct ipc *ipc, uint8_t service_id, uint8_t opcode,
+ uint16_t len, void *param, int fd);
+
void ipc_register(struct ipc *ipc, uint8_t service,
const struct ipc_handler *handlers, uint8_t size);
void ipc_unregister(struct ipc *ipc, uint8_t service);
--
1.9.1
next prev parent reply other threads:[~2014-06-11 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 14:32 [PATCH 00/10] Some HAL IPC work Szymon Janc
2014-06-11 14:32 ` [PATCH 01/10] android/ipc: Make struct service_handler private Szymon Janc
2014-06-11 14:32 ` [PATCH 02/10] android/hal-ipc: Allow to pass custom path to IPC Szymon Janc
2014-06-11 14:32 ` [PATCH 03/10] android/hal-ipc: Fix missing mutex unlock Szymon Janc
2014-06-11 14:32 ` [PATCH 04/10] android/hal-ipc: Move exit calls outside of handle_msg Szymon Janc
2014-06-11 14:32 ` [PATCH 05/10] android/hal-ipc: Move exit calls under failed label in hal_ipc_cmd Szymon Janc
2014-06-11 14:32 ` [PATCH 06/10] android/hal-ipc: Move exit calls under label in notification_handler Szymon Janc
2014-06-11 14:32 ` [PATCH 07/10] android/hal-ipc: Split IPC init and accept to separate functions Szymon Janc
2014-06-11 14:32 ` [PATCH 08/10] android/hal-ipc: Move daemon starting to bluetooth HAL Szymon Janc
2014-06-11 14:32 ` [PATCH 09/10] android/hal-ipc: Pass FD to notification handlers Szymon Janc
2014-06-11 14:32 ` Szymon Janc [this message]
2014-06-12 11:07 ` [PATCH 00/10] Some HAL IPC work 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=1402497172-12436-11-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