[dovecot-cvs] dovecot/src/lib-mail message-address.c,1.13,1.14

cras at dovecot.org cras at dovecot.org
Thu Jul 14 00:35:19 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv17729

Modified Files:
	message-address.c 
Log Message:
If address doesn't have a name, return it as NULL instead of "". This fixes
problems with some clients. Patch by Chris Wakelin



Index: message-address.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-address.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- message-address.c	8 Apr 2005 11:17:58 -0000	1.13
+++ message-address.c	13 Jul 2005 21:35:17 -0000	1.14
@@ -140,6 +140,10 @@
 		return -1;
 
 	ctx->addr.name = p_strdup(ctx->pool, str_c(ctx->str));
+	if (*ctx->addr.name == '\0') {
+		/* Cope with "<address>" without display name */
+		ctx->addr.name = NULL;
+	}
 	if (parse_angle_addr(ctx) < 0) {
 		/* broken */
 		ctx->addr.domain = p_strdup(ctx->pool, "SYNTAX_ERROR");



More information about the dovecot-cvs mailing list