[evolution-ews] Bug #677531 - May skip empty vCards in GAL
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #677531 - May skip empty vCards in GAL
- Date: Wed, 6 Jun 2012 11:19:14 +0000 (UTC)
commit a1261caf3e2cb3fb343ad004ed8441fbd0e29df7
Author: Milan Crha <mcrha redhat com>
Date: Wed Jun 6 13:18:45 2012 +0200
Bug #677531 - May skip empty vCards in GAL
src/addressbook/ews-oab-decoder.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index 8fbd791..a891a4c 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -864,10 +864,12 @@ ews_decode_and_store_oab_records (EwsOabDecoder *eod,
/* set the smtp address as contact's uid */
uid = (gchar *) e_contact_get (contact, E_CONTACT_EMAIL_1);
- e_contact_set (contact, E_CONTACT_UID, uid);
+ if (uid && *uid) {
+ e_contact_set (contact, E_CONTACT_UID, uid);
- cb (contact, offset, ((gfloat) (i + 1) / priv->total_records) * 100, user_data, error);
- d(g_print ("%s \n", e_vcard_to_string ((EVCard *) contact, EVC_FORMAT_VCARD_30));)
+ cb (contact, offset, ((gfloat) (i + 1) / priv->total_records) * 100, user_data, error);
+ d(g_print ("%s \n", e_vcard_to_string ((EVCard *) contact, EVC_FORMAT_VCARD_30));)
+ }
error:
g_object_unref (contact);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]