335d334
< 	STRING_PROP (E_CONTACT_FULL_DISPLAY_NAME,   "displayName" ),
1201a1201
> 	char *cn, *cn_part = NULL;
1203c1203,1236
< 	dn = contact_get_fullname(contact, root_dn);
---
> 
> 	cn = e_contact_get (contact, E_CONTACT_FULL_NAME);
> 	if (cn) {
> 		if (strchr (cn, ',')) {
> 			/* need to escape commas */
> 			char *new_cn = g_malloc0 (strlen (cn) * 3 + 1);
> 			int i, j;
> 
> 			for (i = 0, j = 0; i < strlen (cn); i ++) {
> 				if (cn[i] == ',') {
> 					sprintf (new_cn + j, "%%%02X", cn[i]);
> 					j += 3;
> 				}
> 				else {
> 					new_cn[j++] = cn[i];
> 				}
> 			}
> 			cn_part = g_strdup_printf ("cn=%s", new_cn);
> 			g_free (new_cn);
> 		}
> 		else {
> 			cn_part = g_strdup_printf ("cn=%s", cn);
> 		}
> 	}
> 	else {
> 		cn_part = g_strdup ("");
> 	}
> 
> 	dn = g_strdup_printf ("%s%s%s", cn_part,
> 			      (root_dn && strlen(root_dn)) ? "," : "",
> 			      (root_dn && strlen(root_dn)) ? root_dn: "");
> 
> 	g_free (cn_part);
> 
1204a1238
> 
2683,2727d2716
< static char * 
< contact_get_fullname(EContact *contact, const char *root_dn)
< {
< 	char *name, *cn, *cn_part;
< 	name = e_contact_get (contact_new, E_CONTACT_FULL_NAME_DISPLAY);
<   
< 	if(!name){
< 		cn = e_contact_get (contact_new, E_CONTACT_FULL_NAME);
< 		if (cn) {
< 			if (strchr (cn, ',')) {
< 				/* need to escape commas */
< 				char *new_cn = g_malloc0 (strlen (cn) * 3 + 1);
< 				int i, j;		
< 
< 				for (i = 0, j = 0; i < strlen (cn); i ++) {
< 					if (cn[i] == ',') {
< 						sprintf (new_cn + j, "%%%02X", cn[i]);
< 						j += 3;
< 					}
< 					else {
< 						new_cn[j++] = cn[i];
< 					}
< 				}
< 				cn_part = g_strdup_printf ("cn=%s", new_cn);
< 				g_free (new_cn);
< 			}
< 			else {
< 				cn_part = g_strdup_printf ("cn=%s", cn);
< 			}
< 		}
< 		else {
< 			cn_part = g_strdup ("");
< 		}
< 
< 		name = g_strdup_printf ("%s%s%s", cn_part,
< 				      (root_dn && strlen(root_dn)) ? "," : "",
< 				      (root_dn && strlen(root_dn)) ? root_dn: "");
< 
< 		g_free (cn_part);
< 		g_free (cn);
< 		
< 	}
< 	return name;
< }
< 
2741,2742c2730,2731
< 	list_name1 = contact_get_fullname(contact_new);
< 	list_name2 = contact_get_fullname(contact_current);
---
> 	list_name1 = e_contact_get (contact_new, E_CONTACT_FULL_NAME);
> 	list_name2 = e_contact_get (contact_current, E_CONTACT_FULL_NAME);
