[evolution-couchdb] Use the description field to know which kind of IM address we're dealing with when there is no 'prot



commit ecbf8094f58fd158270028bbbccd5da8d4677022
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Nov 4 23:07:53 2009 +0100

    Use the description field to know which kind of IM address we're dealing with when there is no 'protocol' field

 addressbook/e-book-backend-couchdb.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index fabb7c3..3d46aa1 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -311,6 +311,11 @@ vcard_from_couch_document (CouchDBDocument *document)
 		address_str = couchdb_document_contact_im_get_address (im);
 		description_str = couchdb_document_contact_im_get_description (im);
 		protocol_str = couchdb_document_contact_im_get_protocol (im);
+		/* Some records don't have the 'protocol' field, and use the
+		   'description' field to specify the kind of IM address this
+		   refers to */
+		if (protocol_str == NULL)
+			protocol_str = description_str;
 		uuid_str = couchdb_struct_field_get_uuid (im);
 
 		if (protocol_str != NULL) {



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