[evolution-ews/gnome-3-4] Bug #677531 - May skip empty vCards in GAL



commit 5e87da71bac84175e49b5cb269a1b1ac978df44f
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 6 13:19:22 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 1811b1e..b656ece 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]