[evolution-data-server] Bug 635353 — Don't parse empty addresses in the Google Contacts backend
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 635353 — Don't parse empty addresses in the Google Contacts backend
- Date: Wed, 19 Jan 2011 12:10:57 +0000 (UTC)
commit 10cb89b7d3b40a3e635f8b79a846444b31f15e16
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Nov 20 16:02:50 2010 +0000
Bug 635353 â?? Don't parse empty addresses in the Google Contacts backend
If a vCard ADR attribute is empty, it's cleaner to not return a GData address
for it, rather than return a new empty one. Closes: bgo#635353
.../backends/google/e-book-backend-google.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index 1143e3f..a43ec88 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -2767,7 +2767,7 @@ gdata_gd_postal_address_from_attribute (EVCardAttribute *attr, gboolean *have_pr
GList *values;
values = e_vcard_attribute_get_values (attr);
- if (values) {
+ if (values && values->data && *((gchar *) values->data) != '\0') {
GList *types, *value;
gchar *rel;
const gchar *label;
@@ -2791,8 +2791,6 @@ gdata_gd_postal_address_from_attribute (EVCardAttribute *attr, gboolean *have_pr
/* Set the components of the address from the vCard's attribute values */
value = values;
- if (!value)
- return address;
gdata_gd_postal_address_set_po_box (address, (*((gchar *) value->data) != '\0') ? value->data : NULL);
value = value->next;
if (!value)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]