From: Szymon Janc <szymon.janc@tieto.com>
To: Marcin Kraglak <marcin.kraglak@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/3] android/gatt: Initialize includes queue
Date: Thu, 06 Nov 2014 12:19:02 +0100 [thread overview]
Message-ID: <3787530.1hodOjGVGq@uw000953> (raw)
In-Reply-To: <1415192511-7651-1-git-send-email-marcin.kraglak@tieto.com>
Hi Marcin,
On Wednesday 05 of November 2014 14:01:49 Marcin Kraglak wrote:
> Initialize included queue even if service is Secondary Service.
> ---
> android/gatt.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/android/gatt.c b/android/gatt.c
> index b3dd6d3..87a7a12 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -318,8 +318,7 @@ static void destroy_service(void *data)
> * So we need to free service memory only once but we need to destroy
> * two queues
> */
> - if (srvc->primary)
> - queue_destroy(srvc->included, NULL);
> + queue_destroy(srvc->included, NULL);
>
> free(srvc);
> }
> @@ -1092,12 +1091,10 @@ static struct service *create_service(uint8_t id, bool primary, char *uuid,
>
> /* Put primary service to our local list */
> s->primary = primary;
> - if (s->primary) {
> + if (s->primary)
> memcpy(&s->prim, data, sizeof(s->prim));
> - } else {
> + else
> memcpy(&s->incl, data, sizeof(s->incl));
> - return s;
> - }
>
> /* For primary service allocate queue for included services */
> s->included = queue_new();
Please update (remove?) this comment to avoid confusion.
And maybe move this queue_new() up where service is created.
>
--
Best regards,
Szymon Janc
prev parent reply other threads:[~2014-11-06 11:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 13:01 [PATCH 1/3] android/gatt: Initialize includes queue Marcin Kraglak
2014-11-05 13:01 ` [PATCH 2/3] android/gatt: Search included services in Secondary Services Marcin Kraglak
2014-11-05 13:01 ` [PATCH 3/3] android/pts: Update GATT PTS test results Marcin Kraglak
2014-11-06 15:19 ` Szymon Janc
2014-11-06 11:19 ` 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=3787530.1hodOjGVGq@uw000953 \
--to=szymon.janc@tieto.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