[dovecot-cvs] dovecot/src/lib-storage/index index-search.c,1.45,1.46

cras at procontrol.fi cras at procontrol.fi
Sat Nov 30 16:58:25 EET 2002


Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv1156/lib-storage/index

Modified Files:
	index-search.c 
Log Message:
Body searching wasn't working with unknown charsets, and SEARCH BODY
searched also headers.



Index: index-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- index-search.c	30 Nov 2002 14:36:20 -0000	1.45
+++ index-search.c	30 Nov 2002 14:58:23 -0000	1.46
@@ -534,7 +534,7 @@
 		ret = message_body_search(arg->value.str,
 					  ctx->index_ctx->charset,
 					  &unknown_charset, ctx->inbuf,
-					  ctx->part);
+					  ctx->part, arg->type == SEARCH_TEXT);
 
 		if (ret < 0) {
 			ctx->index_ctx->error = unknown_charset ?
@@ -548,7 +548,6 @@
 static int search_arg_match_text(MailSearchArg *args, SearchIndexContext *ctx)
 {
 	IBuffer *inbuf;
-	MessageSize hdr_size;
 	int have_headers, have_body, have_text;
 
 	/* first check what we need to use */
@@ -567,11 +566,11 @@
 		hdr_ctx.custom_header = TRUE;
 		hdr_ctx.args = args;
 
-		message_parse_header(NULL, inbuf, &hdr_size,
+		message_parse_header(NULL, inbuf, NULL,
 				     search_header, &hdr_ctx);
 	} else {
 		if (!imap_msgcache_get_rfc822(search_open_cache(ctx), &inbuf,
-					      &hdr_size, NULL))
+					      NULL, NULL))
 			return FALSE;
 	}
 




More information about the dovecot-cvs mailing list