[evolution-couchdb] * Make sure email's descriptions are never NULL



commit 5d323003bf5eff06edc02eda731c1592e7656309
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Nov 4 15:31:21 2009 +0100

    * Make sure email's descriptions are never NULL
    * Don't add empty URLs to the CouchDB record

 addressbook/e-book-backend-couchdb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index 06fabc9..fabb7c3 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -411,7 +411,7 @@ contact_email_to_struct_field (EVCardAttribute *attr)
 {
 	const gchar *email;
 	GList *params, *pl;
-	const gchar *description = NULL, *uuid = NULL;
+	const gchar *description = "other", *uuid = NULL;
 
 	email = e_vcard_attribute_get_value (attr);
 	if (email == NULL)
@@ -524,7 +524,7 @@ contact_url_to_struct_field (EVCardAttribute *attr, const gchar *description)
 	GList *params, *pl;
 
 	address = e_vcard_attribute_get_value (attr);
-	if (!address)
+	if (address == NULL || strlen (address) <= 0)
 		return NULL;
 
 	params = e_vcard_attribute_get_params (attr);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]