linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Slawomir Bochenski <lkslawek@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH obexd 4/4] map_ap.c: Add dumping of map_ap_t after decoding
Date: Fri, 13 Jan 2012 14:13:24 +0200	[thread overview]
Message-ID: <CABBYNZJ7OwbpEDpdSQe8L5tOSVWQhmHVaobudYPLM2WyNFYxjA@mail.gmail.com> (raw)
In-Reply-To: <1326451712-21784-4-git-send-email-lkslawek@gmail.com>

Hi Slawomir,

On Fri, Jan 13, 2012 at 12:48 PM, Slawomir Bochenski <lkslawek@gmail.com> wrote:
> ---
>  src/map_ap.c |   25 +++++++++++++++++++++++++
>  1 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/src/map_ap.c b/src/map_ap.c
> index 2e7758e..38e9500 100644
> --- a/src/map_ap.c
> +++ b/src/map_ap.c
> @@ -125,6 +125,29 @@ static int find_ap_def(uint8_t tag)
>        return -1;
>  }
>
> +static void ap_entry_dump(gpointer tag, gpointer val, gpointer user_data)
> +{
> +       struct ap_entry *entry = val;
> +       int tago;
> +
> +       tago = find_ap_def(GPOINTER_TO_INT(tag));
> +
> +       switch (ap_defs[tago].type) {
> +       case APT_UINT8:
> +               DBG("%-30s %08x", ap_defs[tago].name, entry->val8u);
> +               break;
> +       case APT_UINT16:
> +               DBG("%-30s %08x", ap_defs[tago].name, entry->val16u);
> +               break;
> +       case APT_UINT32:
> +               DBG("%-30s %08x", ap_defs[tago].name, entry->val32u);
> +               break;
> +       case APT_STR:
> +               DBG("%-30s %s", ap_defs[tago].name, entry->valstr);
> +               break;
> +       }
> +}
> +
>  static void ap_entry_free(gpointer val)
>  {
>        struct ap_entry *entry = val;
> @@ -228,6 +251,8 @@ skip:
>                done += hdr->len + sizeof(struct obex_ap_header);
>        }
>
> +       g_hash_table_foreach(ap, ap_entry_dump, NULL);
> +

You are dumping on free isn't that more efficient to dump while decoding?

-- 
Luiz Augusto von Dentz

  reply	other threads:[~2012-01-13 12:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 10:48 [PATCH obexd 1/4] MAP: Implementation of MAP AP core functions Slawomir Bochenski
2012-01-13 10:48 ` [PATCH obexd 2/4] map_ap.c: Add implementation for map_ap_set_* Slawomir Bochenski
2012-01-13 10:48 ` [PATCH obexd 3/4] map_ap.c: Add implementation for map_ap_decode() Slawomir Bochenski
2012-01-13 12:09   ` Luiz Augusto von Dentz
2012-01-13 12:40     ` Slawomir Bochenski
2012-01-13 10:48 ` [PATCH obexd 4/4] map_ap.c: Add dumping of map_ap_t after decoding Slawomir Bochenski
2012-01-13 12:13   ` Luiz Augusto von Dentz [this message]
2012-01-13 12:24     ` Slawomir Bochenski
2012-01-13 12:02 ` [PATCH obexd 1/4] MAP: Implementation of MAP AP core functions Luiz Augusto von Dentz
2012-01-13 12:37   ` Slawomir Bochenski
2012-01-13 12:55     ` Slawomir Bochenski

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=CABBYNZJ7OwbpEDpdSQe8L5tOSVWQhmHVaobudYPLM2WyNFYxjA@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lkslawek@gmail.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).