From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-bluetooth@vger.kernel.org, johan.hedberg@gmail.com,
hadess@hadess.net, dforsi@gmail.com
Subject: Re: [PATCH 2/4] Make adapter API accept binary pincodes
Date: Thu, 5 May 2011 14:38:32 -0300 [thread overview]
Message-ID: <20110505173832.GB2098@joana> (raw)
In-Reply-To: <1302455477-27664-3-git-send-email-dh.herrmann@googlemail.com>
* David Herrmann <dh.herrmann@googlemail.com> [2011-04-10 19:11:15 +0200]:
> Add pin-length argument to adapter API to allow passing binary pins
> containing \0 characters to the hci handler.
> ---
> src/adapter.c | 4 ++--
> src/adapter.h | 2 +-
> src/event.c | 6 +++---
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 83f3217..14516ac 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -3701,9 +3701,9 @@ int btd_adapter_remove_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr)
> }
>
> int btd_adapter_pincode_reply(struct btd_adapter *adapter, bdaddr_t *bdaddr,
> - const char *pin)
> + const char *pin, size_t pinlen)
Over column 80 here.
> {
> - return adapter_ops->pincode_reply(adapter->dev_id, bdaddr, pin, pin ? strlen(pin) : 0);
> + return adapter_ops->pincode_reply(adapter->dev_id, bdaddr, pin, pinlen);
> }
>
> int btd_adapter_confirm_reply(struct btd_adapter *adapter, bdaddr_t *bdaddr,
> diff --git a/src/adapter.h b/src/adapter.h
> index fd2fc12..b507506 100644
> --- a/src/adapter.h
> +++ b/src/adapter.h
> @@ -273,7 +273,7 @@ int btd_adapter_disconnect_device(struct btd_adapter *adapter,
> int btd_adapter_remove_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr);
>
> int btd_adapter_pincode_reply(struct btd_adapter *adapter, bdaddr_t *bdaddr,
> - const char *pin);
> + const char *pin, size_t pinlen);
and here.
> int btd_adapter_confirm_reply(struct btd_adapter *adapter, bdaddr_t *bdaddr,
> gboolean success);
> int btd_adapter_passkey_reply(struct btd_adapter *adapter, bdaddr_t *bdaddr,
> diff --git a/src/event.c b/src/event.c
> index 4ca1be5..248fb78 100644
> --- a/src/event.c
> +++ b/src/event.c
> @@ -111,13 +111,13 @@ static void pincode_cb(struct agent *agent, DBusError *derr,
> device_get_address(device, &dba);
>
> if (derr) {
> - err = btd_adapter_pincode_reply(adapter, &dba, NULL);
> + err = btd_adapter_pincode_reply(adapter, &dba, NULL, 0);
> if (err < 0)
> goto fail;
> return;
> }
>
> - err = btd_adapter_pincode_reply(adapter, &dba, pincode);
> + err = btd_adapter_pincode_reply(adapter, &dba, pincode, pincode ? strlen(pincode) : 0);
and here.
--
Gustavo F. Padovan
http://profusion.mobi
next prev parent reply other threads:[~2011-05-05 17:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 17:11 [RFC][PATCH 0/4] Allow hexadecimal encoded pins David Herrmann
2011-04-10 17:11 ` [PATCH 1/4] Add length argument to hci pincode reply David Herrmann
2011-05-05 17:34 ` Gustavo F. Padovan
2011-04-10 17:11 ` [PATCH 2/4] Make adapter API accept binary pincodes David Herrmann
2011-05-05 17:38 ` Gustavo F. Padovan [this message]
2011-04-10 17:11 ` [PATCH 3/4] Parse pin codes starting with '$' as hexadecimal encoded strings David Herrmann
2011-04-10 17:11 ` [PATCH 4/4] Remove 16 byte limit for PIN codes returned by agents David Herrmann
2011-05-02 23:32 ` [RFC][PATCH 0/4] Allow hexadecimal encoded pins Bastien Nocera
2011-05-03 11:51 ` David Herrmann
2011-05-03 12:27 ` Daniele Forsi
2011-05-03 18:28 ` David Herrmann
2011-05-06 1:37 ` Bastien Nocera
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=20110505173832.GB2098@joana \
--to=padovan@profusion.mobi \
--cc=dforsi@gmail.com \
--cc=dh.herrmann@googlemail.com \
--cc=hadess@hadess.net \
--cc=johan.hedberg@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.