[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-list.c, 1.4, 1.5

tss-movial at dovecot.org tss-movial at dovecot.org
Mon Feb 27 18:22:00 EET 2006


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

Modified Files:
	dbox-list.c 
Log Message:
Moved mailbox_list_flags to struct mailbox_list_context so plugins can see the flags more easily.



Index: dbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dbox-list.c	22 Feb 2006 14:52:13 -0000	1.4
+++ dbox-list.c	27 Feb 2006 16:21:58 -0000	1.5
@@ -21,8 +21,6 @@
 	struct mailbox_list_context mailbox_ctx;
 	struct index_storage *istorage;
 
-	enum mailbox_list_flags flags;
-
 	struct imap_match_glob *glob;
 	struct subsfile_list_context *subsfile_ctx;
 
@@ -126,8 +124,8 @@
 
 	if ((flags & MAILBOX_LIST_SUBSCRIBED) != 0) {
 		ctx->mailbox_ctx.storage = storage;
+		ctx->mailbox_ctx.flags = flags;
 		ctx->istorage = istorage;
-		ctx->flags = flags;
 		ctx->next = dbox_list_subs;
 
 		path = t_strconcat(istorage->dir,
@@ -152,7 +150,7 @@
 		return &ctx->mailbox_ctx;
 	/* if user gave invalid directory, we just don't show any results. */
 
-	ctx->flags = flags;
+	ctx->mailbox_ctx.flags = flags;
 	ctx->glob = imap_match_init(default_pool, mask, TRUE, '/');
 
 	if (virtual_path != NULL && dirp != NULL)
@@ -273,7 +271,7 @@
 
 	/* make sure we give only one correct INBOX */
 	if (strcasecmp(list_path, "INBOX") == 0 &&
-	    (ctx->flags & MAILBOX_LIST_INBOX) != 0) {
+	    (ctx->mailbox_ctx.flags & MAILBOX_LIST_INBOX) != 0) {
 		if (ctx->inbox_found)
 			return 0;
 
@@ -340,7 +338,7 @@
 		i_unreached();
 	}
 
-	if ((ctx->flags & MAILBOX_LIST_FAST_FLAGS) != 0)
+	if ((ctx->mailbox_ctx.flags & MAILBOX_LIST_FAST_FLAGS) != 0)
 		return &ctx->list;
 
 	t_push();
@@ -407,7 +405,8 @@
 		list_dir_context_free(dir);
 	}
 
-	if (!ctx->inbox_found && (ctx->flags & MAILBOX_LIST_INBOX) != 0 &&
+	if (!ctx->inbox_found &&
+	    (ctx->mailbox_ctx.flags & MAILBOX_LIST_INBOX) != 0 &&
 	    ctx->glob != NULL && imap_match(ctx->glob, "INBOX")  > 0) {
 		/* show inbox */
 		ctx->inbox_found = TRUE;



More information about the dovecot-cvs mailing list