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

cras at dovecot.org cras at dovecot.org
Fri Jul 22 14:47:09 EEST 2005


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

Modified Files:
	message-header-search.c 
Log Message:
Try to compare strings even if charset conversion failed.



Index: message-header-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-header-search.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- message-header-search.c	20 Dec 2004 12:51:18 -0000	1.13
+++ message-header-search.c	22 Jul 2005 11:47:07 -0000	1.14
@@ -104,12 +104,15 @@
 						 data, size, &utf8_size);
 
 	if (utf8_data == NULL) {
-		/* unknown character set, or invalid data */
-	} else {
-		ctx->submatch = TRUE;
-		search_loop((const unsigned char *) utf8_data, utf8_size, ctx);
-		ctx->submatch = FALSE;
+		/* unknown character set, or invalid data. just compare it
+		   directly so at least ASCII comparision works. */
+		utf8_data = data;
+		utf8_size = size;
 	}
+
+	ctx->submatch = TRUE;
+	search_loop((const unsigned char *) utf8_data, utf8_size, ctx);
+	ctx->submatch = FALSE;
 }
 
 static void search_loop(const unsigned char *data, size_t size,



More information about the dovecot-cvs mailing list