[Commits] ldif.c 1.12.2.23 1.12.2.24

claws at claws-mail.org claws at claws-mail.org
Thu Oct 20 20:19:49 CEST 2011


Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv20650/src

Modified Files:
      Tag: gtk2
	ldif.c 
Log Message:
2011-10-20 [paul]	3.7.10cvs39

	* AUTHORS
	* src/ldif.c
	* src/gtk/authors.h
		fix bug 2479, 'LDIF address book import matches tags case sensitive'
		Patch by Bodo Graumann <mail at bodograumann.de> 

Index: ldif.c
===================================================================
RCS file: /home/claws-mail/claws/src/ldif.c,v
retrieving revision 1.12.2.23
retrieving revision 1.12.2.24
diff -u -d -r1.12.2.23 -r1.12.2.24
--- ldif.c	16 Feb 2011 07:16:07 -0000	1.12.2.23
+++ ldif.c	20 Oct 2011 18:19:47 -0000	1.12.2.24
@@ -526,8 +526,7 @@
 {
 	gchar *nm, *val;
 
-	nm = g_strdup( tagName );
-	g_utf8_strdown( nm, -1 );
+	nm = g_utf8_strdown( tagName, -1 );
 	if( tagValue ) {
 		val = g_strdup( tagValue );
 	}
@@ -536,19 +535,19 @@
 	}
 	g_strstrip( val );
 
-	if( g_utf8_collate( nm, LDIF_TAG_COMMONNAME ) == 0 ) {
+	if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_COMMONNAME, -1 ) ) == 0 ) {
 		rec->listCName = g_slist_append( rec->listCName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_FIRSTNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_FIRSTNAME, -1 ) ) == 0 ) {
 		rec->listFName = g_slist_append( rec->listFName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_LASTNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_LASTNAME, -1 ) ) == 0 ) {
 		rec->listLName = g_slist_append( rec->listLName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_NICKNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_NICKNAME, -1 ) ) == 0 ) {
 		rec->listNName = g_slist_append( rec->listNName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_EMAIL ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_EMAIL, -1 ) ) == 0 ) {
 		rec->listAddress = g_slist_append( rec->listAddress, val );
 	}
 	else {
@@ -756,30 +755,30 @@
 		gchar *tag = node->data;
 		if( ! g_hash_table_lookup( table, tag ) ) {
 			Ldif_FieldRec *rec = NULL;
-			gchar *key = g_strdup( tag );
+			gchar *key = g_utf8_strdown( tag, -1 );
 
 			rec = ldif_create_fieldrec( tag );
-			if( g_utf8_collate( tag, LDIF_TAG_DN ) == 0 ) {
+			if( g_utf8_collate( key, LDIF_TAG_DN ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( "dn" );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_COMMONNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_COMMONNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Display Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_FIRSTNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_FIRSTNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "First Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_LASTNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_LASTNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Last Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_NICKNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_NICKNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Nick Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_EMAIL ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_EMAIL, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Email Address" ) );
 			}



More information about the Commits mailing list