[dovecot-cvs] dovecot/src/lib-storage/subscription-file subscription-file.c,1.10,1.11

cras at procontrol.fi cras at procontrol.fi
Wed Dec 4 00:44:41 EET 2002


Update of /home/cvs/dovecot/src/lib-storage/subscription-file
In directory danu:/tmp/cvs-serv18428/src/lib-storage/subscription-file

Modified Files:
	subscription-file.c 
Log Message:
Rewrote imap_match() function. Maybe not as fast as before, but at least
it's understandable now. This was required to fix listing mbox mailboxes
where we wanted to match partial paths (it was pretty buggy before).



Index: subscription-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- subscription-file.c	1 Dec 2002 13:10:15 -0000	1.10
+++ subscription-file.c	3 Dec 2002 22:44:38 -0000	1.11
@@ -166,7 +166,7 @@
 int subsfile_foreach(MailStorage *storage, const char *mask,
 		     SubsFileForeachFunc func, void *context)
 {
-        const ImapMatchGlob *glob;
+        ImapMatchGlob *glob;
 	const char *path, *start, *end, *p, *line;
 	void *mmap_base;
 	size_t mmap_length;
@@ -188,8 +188,7 @@
 		}
 
 		line = t_strdup_until(start, p);
-		if (line != NULL && *line != '\0' &&
-		    imap_match(glob, line, 0, NULL) >= 0)
+		if (line != NULL && *line != '\0' && imap_match(glob, line) > 0)
 			ret = func(storage, line, context);
 		t_pop();
 




More information about the dovecot-cvs mailing list