From: Johan Hedberg <johan.hedberg@gmail.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 02/18] eir: Add support for parsing SSP hash and randomizer
Date: Mon, 24 Sep 2012 11:08:45 +0300 [thread overview]
Message-ID: <20120924080845.GA19184@x220> (raw)
In-Reply-To: <1348230995-8967-3-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Fri, Sep 21, 2012, Szymon Janc wrote:
> + case EIR_SSP_HASH:
> + if (data_len < 16)
> + break;
> + eir->hash = g_malloc(16);
> + memcpy(eir->hash, data, 16);
> + break;
> +
> + case EIR_SSP_RANDOMIZER:
> + if (data_len < 16)
> + break;
> + eir->randomizer = g_malloc(16);
> + memcpy(eir->randomizer, data, 16);
> + break;
I suppose using g_memdup would be simpler than g_malloc + memcpy.
Johan
next prev parent reply other threads:[~2012-09-24 8:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 12:36 [PATCH v3 00/18] neard plugin Szymon Janc
2012-09-21 12:36 ` [PATCH v3 01/18] Add initial neard plugin implementation Szymon Janc
2012-09-21 12:36 ` [PATCH v3 02/18] eir: Add support for parsing SSP hash and randomizer Szymon Janc
2012-09-24 8:08 ` Johan Hedberg [this message]
2012-09-24 10:20 ` Szymon Janc
2012-09-21 12:36 ` [PATCH v3 03/18] eir: Store class in struct eir_data as uint32_t Szymon Janc
2012-09-21 12:36 ` [PATCH v3 04/18] eir: Add eir_parse_oob function Szymon Janc
2012-09-21 12:36 ` [PATCH v3 05/18] oob: Allow to register pairing complete callback Szymon Janc
2012-09-24 9:06 ` Johan Hedberg
2012-09-24 11:28 ` Szymon Janc
2012-09-21 12:36 ` [PATCH v3 06/18] Handle missing randomizer in mgmt_add_remote_oob_data Szymon Janc
2012-09-21 12:36 ` [PATCH v3 07/18] neard: Implement PushOOB function Szymon Janc
2012-09-24 9:09 ` Johan Hedberg
2012-09-24 14:38 ` Szymon Janc
2012-09-21 12:36 ` [PATCH v3 08/18] eir: Add support creating EIR with hash and randomizer fields Szymon Janc
2012-09-21 12:36 ` [PATCH v3 09/18] eir: Add support for creating EIR with CoD field Szymon Janc
2012-09-21 12:36 ` [PATCH v3 10/18] eir: Rename eir_create to eir_create_oob Szymon Janc
2012-09-21 12:36 ` [PATCH v3 11/18] eir: Remove support for creating EIR with tx_power fields Szymon Janc
2012-09-21 12:36 ` [PATCH v3 12/18] eir: Return number of bytes written by eir_create_oob Szymon Janc
2012-09-21 12:36 ` [PATCH v3 13/18] eir: Remove struct uuid_info Szymon Janc
2012-09-21 12:36 ` [PATCH v3 14/18] eir: Add support for creating proper OOB EIR Szymon Janc
2012-09-21 12:36 ` [PATCH v3 15/18] adapter: Add btd_adapter_get_services function Szymon Janc
2012-09-21 12:36 ` [PATCH v3 16/18] adapter: Rename btd_adapter_get_class to btd_adapter_read_class Szymon Janc
2012-09-21 12:36 ` [PATCH v3 17/18] adapter: Add btd_adapter_get_class function Szymon Janc
2012-09-21 12:36 ` [PATCH v3 18/18] neard: Implement RequestOOB function 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=20120924080845.GA19184@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@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;
as well as URLs for NNTP newsgroup(s).