[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-copy.c, 1.47, 1.48 maildir-mail.c, 1.30, 1.31 maildir-sync.c, 1.86, 1.87

tss at dovecot.org tss at dovecot.org
Fri Dec 15 18:38:24 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv3614/lib-storage/index/maildir

Modified Files:
	maildir-copy.c maildir-mail.c maildir-sync.c 
Log Message:
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.



Index: maildir-copy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-copy.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- maildir-copy.c	25 Nov 2006 22:17:42 -0000	1.47
+++ maildir-copy.c	15 Dec 2006 18:38:21 -0000	1.48
@@ -55,9 +55,8 @@
 }
 
 static int do_hardlink(struct maildir_mailbox *mbox, const char *path,
-		       void *context)
+		       struct hardlink_ctx *ctx)
 {
-	struct hardlink_ctx *ctx = context;
 	int ret;
 
 	if (mbox->storage->save_size_in_filename && !ctx->size_set) {

Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- maildir-mail.c	15 Oct 2006 12:26:42 -0000	1.30
+++ maildir-mail.c	15 Dec 2006 18:38:22 -0000	1.31
@@ -11,10 +11,8 @@
 #include <sys/stat.h>
 
 static int
-do_open(struct maildir_mailbox *mbox, const char *path, void *context)
+do_open(struct maildir_mailbox *mbox, const char *path, int *fd)
 {
-	int *fd = context;
-
 	*fd = open(path, O_RDONLY);
 	if (*fd != -1)
 		return 1;
@@ -27,10 +25,8 @@
 }
 
 static int
-do_stat(struct maildir_mailbox *mbox, const char *path, void *context)
+do_stat(struct maildir_mailbox *mbox, const char *path, struct stat *st)
 {
-	struct stat *st = context;
-
 	if (stat(path, st) == 0)
 		return 1;
 	if (errno == ENOENT)

Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- maildir-sync.c	10 Dec 2006 13:01:30 -0000	1.86
+++ maildir-sync.c	15 Dec 2006 18:38:22 -0000	1.87
@@ -394,9 +394,8 @@
 }
 
 static int maildir_sync_flags(struct maildir_mailbox *mbox, const char *path,
-			      void *context)
+			      struct maildir_index_sync_context *ctx)
 {
-        struct maildir_index_sync_context *ctx = context;
 	const struct mail_index_sync_rec *recs;
 	const char *dir, *fname, *newfname, *newpath;
 	enum mail_flags flags;



More information about the dovecot-cvs mailing list