2011-03-02 13:25:55

by Lukasz Pawlik

[permalink] [raw]
Subject: [PATCH] Fix handling owner data in phonebook pull

This patch fix handling "empty" phone owner data in phonebook pull via
PBAP. Previously owner vCard was always present as a first on list in
phonebook pull results even if it was empty. This patch fix this and
owner vCard will not be present in pulled phonebook.
---
plugins/phonebook-tracker.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 2cd10de..e71ec7b 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -137,6 +137,7 @@
"WHERE {" \
" ?_contact a nco:PersonContact ." \
" OPTIONAL {?_contact nco:hasAffiliation ?_role .}" \
+" FILTER (regex(str(?_contact), \"urn:uuid:\"))" \
"}" \
"ORDER BY tracker:id(?_contact)"

--
1.7.0.4



2011-03-04 18:46:53

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Fix handling owner data in phonebook pull

Hi Lukasz,

On Wed, Mar 02, 2011, Lukasz Pawlik wrote:
> This patch fix handling "empty" phone owner data in phonebook pull via
> PBAP. Previously owner vCard was always present as a first on list in
> phonebook pull results even if it was empty. This patch fix this and
> owner vCard will not be present in pulled phonebook.
> ---
> plugins/phonebook-tracker.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

Pushed upstream. Thanks.

Johan