evolution-data-server r8518 - in trunk/addressbook: . libebook



Author: mcrha
Date: Thu Feb 21 15:29:48 2008
New Revision: 8518
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8518&view=rev

Log:
2008-02-21  Milan Crha  <mcrha redhat com>

	** Fix for bug #517885
	
	* libebook/e-contact.c: (e_contact_set_property), (e_contact_field_id),
	(e_contact_get), (e_contact_get):
	* libebook/e-vcard.c: (read_attribute_value),
	(e_vcard_to_string_vcard_30), (e_vcard_get_attribute):
	Do not compare value/parameter names case sensitively.



Modified:
   trunk/addressbook/ChangeLog
   trunk/addressbook/libebook/e-contact.c
   trunk/addressbook/libebook/e-vcard.c

Modified: trunk/addressbook/libebook/e-contact.c
==============================================================================
--- trunk/addressbook/libebook/e-contact.c	(original)
+++ trunk/addressbook/libebook/e-contact.c	Thu Feb 21 15:29:48 2008
@@ -801,7 +801,7 @@
 				else {
 					/* we didn't find it - add a new attribute */
 					attr = e_vcard_attribute_new (NULL, info->vcard_field_name);
-					if (!strcmp(info->vcard_field_name, "EMAIL") &&
+					if (!g_ascii_strcasecmp (info->vcard_field_name, "EMAIL") &&
 					    !info->attr_type1 &&
 					    !info->attr_type2) {
 						/* Add default type */
@@ -1358,7 +1358,7 @@
 {
 	int i;
 	for (i = E_CONTACT_FIELD_FIRST; i < E_CONTACT_FIELD_LAST; i ++) {
-		if (!strcmp (field_info[i].field_name, field_name))
+		if (!g_ascii_strcasecmp (field_info[i].field_name, field_name))
 			return field_info[i].field_id;
 	}
 
@@ -1433,7 +1433,7 @@
 
 				name = e_vcard_attribute_get_name (attr);
 
-				if (!strcmp (name, info->vcard_field_name)) {
+				if (!g_ascii_strcasecmp (name, info->vcard_field_name)) {
 					if (num_left-- == 0) {
 						GList *v = e_vcard_attribute_get_values (attr);
 
@@ -1534,7 +1534,7 @@
 
 			name = e_vcard_attribute_get_name (attr);
 
-			if (!strcmp (name, info->vcard_field_name)) {
+			if (!g_ascii_strcasecmp (name, info->vcard_field_name)) {
 				GList *v;
 				v = e_vcard_attribute_get_values (attr);
 

Modified: trunk/addressbook/libebook/e-vcard.c
==============================================================================
--- trunk/addressbook/libebook/e-vcard.c	(original)
+++ trunk/addressbook/libebook/e-vcard.c	Thu Feb 21 15:29:48 2008
@@ -288,7 +288,7 @@
 			lp = g_utf8_next_char(lp);
 		}
 		else if ((*lp == ';') ||
-			 (*lp == ',' && !strcmp (attr->name, "CATEGORIES"))) {
+			 (*lp == ',' && !g_ascii_strcasecmp (attr->name, "CATEGORIES"))) {
 			e_vcard_attribute_add_value (attr, str->str);
 			g_string_assign (str, "");
 			lp = g_utf8_next_char(lp);
@@ -874,7 +874,7 @@
 				/* XXX toshok - i hate you, rfc 2426.
 				   why doesn't CATEGORIES use a ; like
 				   a normal list attribute? */
-				if (!strcmp (attr->name, "CATEGORIES"))
+				if (!g_ascii_strcasecmp (attr->name, "CATEGORIES"))
 					g_string_append_c (attr_str, ',');
 				else
 					g_string_append_c (attr_str, ';');
@@ -1703,7 +1703,7 @@
                 EVCardAttribute *attr;
 
                 attr = (EVCardAttribute *) l->data;
-                if (strcmp (attr->name, name) == 0)
+                if (g_ascii_strcasecmp (attr->name, name) == 0)
                         return attr;
         }
 



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