From: Szymon Janc <szymon.janc@gmail.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/3] android/gatt: Move get_sec_level function
Date: Tue, 17 Jun 2014 21:57:11 +0200 [thread overview]
Message-ID: <2294168.zuOePBTdec@athlon> (raw)
In-Reply-To: <1403011871-8354-1-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Tuesday 17 June 2014 15:31:09 Marcin Kraglak wrote:
> This will be used in read and write handlers functions.
> ---
> android/gatt.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index a19fe5c..9531577 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -2715,6 +2715,22 @@ static void read_char_cb(guint8 status, const guint8
> *pdu, guint16 len, free(data);
> }
>
> +static int get_sec_level(struct gatt_device *dev)
> +{
> + GIOChannel *io;
> + int sec_level;
> +
> + io = g_attrib_get_channel(dev->attrib);
> +
> + if (!bt_io_get(io, NULL, BT_IO_OPT_SEC_LEVEL, &sec_level,
> + BT_IO_OPT_INVALID)) {
> + error("gatt: Failed to get sec_level");
> + return -1;
> + }
> +
> + return sec_level;
> +}
> +
> static void handle_client_read_characteristic(const void *buf, uint16_t
> len) {
> const struct hal_cmd_gatt_client_read_characteristic *cmd = buf;
> @@ -2835,22 +2851,6 @@ static bool signed_write_cmd(struct gatt_device *dev,
> uint16_t handle, return true;
> }
>
> -static int get_sec_level(struct gatt_device *dev)
> -{
> - GIOChannel *io;
> - int sec_level;
> -
> - io = g_attrib_get_channel(dev->attrib);
> -
> - if (!bt_io_get(io, NULL, BT_IO_OPT_SEC_LEVEL, &sec_level,
> - BT_IO_OPT_INVALID)) {
> - error("gatt: Failed to get sec_level");
> - return -1;
> - }
> -
> - return sec_level;
> -}
> -
> static void handle_client_write_characteristic(const void *buf, uint16_t
> len) {
> const struct hal_cmd_gatt_client_write_characteristic *cmd = buf;
This patch is now applied. Thanks.
--
Szymon K. Janc
szymon.janc@gmail.com
prev parent reply other threads:[~2014-06-17 19:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 13:31 [PATCH 1/3] android/gatt: Move get_sec_level function Marcin Kraglak
2014-06-17 13:31 ` [PATCH 2/3] android/hal-msg: Add defines of HAL_AUTHENTICATION values Marcin Kraglak
2014-06-17 13:31 ` [PATCH 3/3] android/gatt: Set security level if user requested Marcin Kraglak
2014-06-17 19:52 ` Szymon Janc
2014-06-17 19:57 ` Szymon Janc [this message]
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=2294168.zuOePBTdec@athlon \
--to=szymon.janc@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcin.kraglak@tieto.com \
/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