From: Frederic Danis <frederic.danis@linux.intel.com>
To: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 4/4] sdp: Make sdp_record_remove to be handled by adapter
Date: Wed, 28 Aug 2013 12:04:06 +0200 [thread overview]
Message-ID: <521DCB16.9000606@linux.intel.com> (raw)
In-Reply-To: <1377522441-28671-5-git-send-email-grzegorz.kolodziejczyk@tieto.com>
Hello Grzegorz,
On 26/08/2013 15:07, Grzegorz Kolodziejczyk wrote:
<snip>
> diff --git a/src/adapter.c b/src/adapter.c
> index 8e897ce..8a5398f 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -6338,6 +6338,46 @@ int adapter_add_record_to_server(const bdaddr_t *device, sdp_record_t *rec)
> return chck;
> }
>
> +int adapter_remove_record_from_server(uint32_t handle)
> +{
> + int chck;
> + sdp_list_t *p;
> + sdp_record_t *r;
> + sdp_access_t *a;
> + sdp_record_t rh, ah;
> +
> + chck = remove_record_from_server(handle);
> +
> + if (chck == 0) {
> + // record_locate section
Please use C89 coding style for comments.
> + rh.handle = handle;
> + p = sdp_list_find(sdp_get_record_list(), &rh, record_sort);
> +
> + r = p->data;
> +
> + // access_locate section
idem here
> + ah.handle = handle;
> + p = sdp_list_find(sdp_get_access_list(), &ah, record_sort);
> +
> + if (p == NULL || p->data == NULL)
> + return 0;
> +
> + a = p->data;
> +
> + // remove from adapter services
and here
> + if (bacmp(&a->device, BDADDR_ANY) != 0) {
> + struct btd_adapter *adapter = adapter_find(&a->device);
> + if (adapter)
> + adapter_service_remove(adapter, r);
> + } else
> + adapter_foreach(adapter_service_remove, r);
> +
> + free(a);
> + }
> +
> + return chck;
> +}
> +
Regards
Fred
--
Frederic Danis Open Source Technology Center
frederic.danis@intel.com Intel Corporation
next prev parent reply other threads:[~2013-08-28 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 13:07 [PATCH 0/4] *** Make sdp independent from adapter *** Grzegorz Kolodziejczyk
2013-08-26 13:07 ` [PATCH 1/4] sdp: Move sdp server init to adapter Grzegorz Kolodziejczyk
2013-08-28 10:01 ` Frederic Danis
2013-08-26 13:07 ` [PATCH 2/4] sdp: Move spd_init_services_list " Grzegorz Kolodziejczyk
2013-08-26 13:07 ` [PATCH 3/4] sdp: Make sdp_record_add to be handled by adapter Grzegorz Kolodziejczyk
2013-08-28 10:02 ` Frederic Danis
2013-08-26 13:07 ` [PATCH 4/4] sdp: Make sdp_record_remove " Grzegorz Kolodziejczyk
2013-08-28 10:04 ` Frederic Danis [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-29 9:56 [PATCH 0/4] Make sdp independent from adapter Grzegorz Kolodziejczyk
2013-08-29 9:56 ` [PATCH 4/4] sdp: Make sdp_record_remove to be handled by adapter Grzegorz Kolodziejczyk
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=521DCB16.9000606@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=grzegorz.kolodziejczyk@tieto.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 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).