From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Radoslaw Jablonski <ext-jablonski.radoslaw@nokia.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fixed empty 'N:' parameter handling for VCARDs
Date: Sun, 11 Jul 2010 12:14:31 -0300 [thread overview]
Message-ID: <20100711151431.GA10776@jh-x301> (raw)
In-Reply-To: <1278698276.10421.145.camel@localhost.localdomain>
Hi Marcel,
On Fri, Jul 09, 2010, Marcel Holtmann wrote:
> > Bluetooth PBAP specification expects for call history listing,
> > that parameter N: shall be empty when we cannot retrieve personal data
> > from PSE phone book.
> > Some devices(by example BH-903) are having problems when after N: parameter
> > unnecessary characters occurs. List of dialed/incoming calls on carkit
> > then is useless - carkit shows only blank lines and it's impossible to
> > determine who made call.
>
> please be a bit consistent with your spaces here.
>
> > In previous version unnecessary semicolons were added after N:("N:;;;;")
> > to represent empty name.
> > Now if none of the contact fields is available, then adding real empty "N:"
> > parameter (without semicolons).
> > ---
> > plugins/vcard.c | 35 +++++++++++++++++++++++++++++++++++
> > 1 files changed, 35 insertions(+), 0 deletions(-)
> >
> > diff --git a/plugins/vcard.c b/plugins/vcard.c
> > index 5948a4a..108f6bd 100644
> > --- a/plugins/vcard.c
> > +++ b/plugins/vcard.c
> > @@ -133,9 +133,44 @@ static void vcard_printf_begin(GString *vcards, uint8_t format)
> > vcard_printf(vcards, "VERSION:2.1");
> > }
> >
> > +/* checks if there is at least one present contact field with personal data */
>
> "check if there is at least one contact field with personal data
> present"
>
> > +static gboolean contact_fields_present(struct phonebook_contact * contact)
> > +{
> > + if (contact->family && strlen(contact->family) > 0)
> > + return TRUE;
> > +
> > + if (contact->given && strlen(contact->given) > 0)
> > + return TRUE;
> > +
> > + if (contact->additional && strlen(contact->additional) > 0)
> > + return TRUE;
> > +
> > + if (contact->prefix && strlen(contact->prefix) > 0)
> > + return TRUE;
> > +
> > + if (contact->suffix && strlen(contact->suffix) > 0)
> > + return TRUE;
> > +
> > + /* none of the personal data fields is present*/
>
> "none of the personal data fields are present"
>
> > + return FALSE;
> > +}
> > +
> > static void vcard_printf_name(GString *vcards,
> > struct phonebook_contact *contact)
> > {
> > + if (contact_fields_present(contact) == FALSE) {
> > + /*
> > + * If fields are empty, then add only 'N:' as parameter.
> > + * This is crucial for some devices ( Nokia BH-903) which
>
> Please be consistent with spaces.
>
> > + * have problems with history listings - can't determine
> > + * if parameter is really empty if there are unnecessary
> > + * characters after'N:' (like 'N:;;;;').
> > + * We need to add only'N:' param - without semicolons.
>
> Same here.
I went ahead and fixed these issues myself so we can get another obexd
release out. The fixed patch is now upstream.
Johan
next prev parent reply other threads:[~2010-07-11 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 14:34 [PATCH] Fixed empty 'N:' parameter handling for VCARDs Radoslaw Jablonski
2010-07-09 17:57 ` Marcel Holtmann
2010-07-11 15:14 ` Johan Hedberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-07-09 10:19 Radoslaw Jablonski
2010-07-09 13:00 ` Marcel Holtmann
2010-07-09 9:27 Radoslaw Jablonski
2010-07-09 8:30 ext-jablonski.radoslaw
2010-07-09 8:39 ` Marcel Holtmann
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=20100711151431.GA10776@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=ext-jablonski.radoslaw@nokia.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).