[Commits] addr_compl.c 1.27.2.66 1.27.2.67

mones at claws-mail.org mones at claws-mail.org
Mon Dec 10 15:21:48 CET 2012


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

Modified Files:
      Tag: gtk2
	addr_compl.c 
Log Message:
2012-12-10 [mones]	3.9.0cvs45

	* src/addr_compl.c
		Fix bug #2835 (core part) to allow NULL names which
		have an address 

Index: addr_compl.c
===================================================================
RCS file: /home/claws-mail/claws/src/addr_compl.c,v
retrieving revision 1.27.2.66
retrieving revision 1.27.2.67
diff -u -d -r1.27.2.66 -r1.27.2.67
--- addr_compl.c	15 Nov 2012 13:41:04 -0000	1.27.2.66
+++ addr_compl.c	10 Dec 2012 14:21:46 -0000	1.27.2.67
@@ -256,30 +256,30 @@
 {
 	address_entry *ae;
 
-	if (!name || !address) {
-		if (address || nick || alias || !grp_emails) 
-			return -1;
-	}
+	if (!address && !grp_emails)
+		return -1;
 
-	ae = g_new0(address_entry, 1);
+	if (!name)
+		name = "";
 
+	ae = g_new0(address_entry, 1);
 	cm_return_val_if_fail(ae != NULL, -1);
 
-	ae->name    = g_strdup(name);
+	ae->name = g_strdup(name);
 	ae->address = g_strdup(address);
 	ae->grp_emails = grp_emails;
 	g_address_list = g_list_prepend(g_address_list, ae);
 
 	addr_compl_add_address1(name, ae);
+
 	if (address != NULL && *address != '\0')
 		addr_compl_add_address1(address, ae);
 
 	if (nick != NULL && *nick != '\0')
 		addr_compl_add_address1(nick, ae);
 
-	if ( alias != NULL && *alias != '\0') {
+	if (alias != NULL && *alias != '\0')
 		addr_compl_add_address1(alias, ae);
-	}
 
 	return 0;
 }



More information about the Commits mailing list