From: Johan Hedberg <johan.hedberg@gmail.com>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Return an error if the attribute requires authorization
Date: Thu, 24 Mar 2011 11:20:42 +0200 [thread overview]
Message-ID: <20110324092042.GC30621@jh-x301> (raw)
In-Reply-To: <1300909212-15709-1-git-send-email-claudio.takahasi@openbossa.org>
Hi Claudio,
On Wed, Mar 23, 2011, Claudio Takahasi wrote:
> If an attribute requires authorization, Insuficient Authorization
> will be returned by the attribute server until the Agent supports
> a method to authorize attribute access.
> ---
> src/attrib-server.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/attrib-server.c b/src/attrib-server.c
> index 9543da6..dc05d7e 100644
> --- a/src/attrib-server.c
> +++ b/src/attrib-server.c
> @@ -173,6 +173,8 @@ static uint8_t att_check_reqs(struct gatt_channel *channel, uint8_t opcode,
> channel->encrypted = g_attrib_is_encrypted(channel->attrib);
> if (reqs == ATT_AUTHENTICATION && !channel->encrypted)
> return ATT_ECODE_INSUFF_AUTHEN;
> + else if (reqs == ATT_AUTHORIZATION)
> + return ATT_ECODE_INSUFF_AUTHO;
>
> switch (opcode) {
> case ATT_OP_READ_BY_GROUP_REQ:
Pushed upstream. Thanks.
Btw, I'm not really a fan of those "authen" and "autho" short versions.
Since you're already spelling the words out in other defines (e.g.
ATT_AUTHENTICATION) I suppose it'd make sense to do the same for the
error codes as well.
Johan
prev parent reply other threads:[~2011-03-24 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 19:40 [PATCH] Return an error if the attribute requires authorization Claudio Takahasi
2011-03-23 19:40 ` [PATCH] TODO: Add item related to authorization and authentication Claudio Takahasi
2011-03-24 9:21 ` Johan Hedberg
2011-03-24 9:20 ` Johan Hedberg [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=20110324092042.GC30621@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@openbossa.org \
--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