dovecot-2.2: doveadm: Removed unused doveadm_mailbox_find_and_sy...

dovecot at dovecot.org dovecot at dovecot.org
Sat May 9 16:41:32 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/cff670d68f69
changeset: 18615:cff670d68f69
user:      Timo Sirainen <tss at iki.fi>
date:      Sat May 09 19:39:39 2015 +0300
description:
doveadm: Removed unused doveadm_mailbox_find_and_sync() function

diffstat:

 src/doveadm/doveadm-mail.c |  32 --------------------------------
 src/doveadm/doveadm-mail.h |   2 --
 2 files changed, 0 insertions(+), 34 deletions(-)

diffs (54 lines):

diff -r 1c2e42bf8825 -r cff670d68f69 src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Sat May 09 19:35:31 2015 +0300
+++ b/src/doveadm/doveadm-mail.c	Sat May 09 19:39:39 2015 +0300
@@ -243,38 +243,6 @@
 	return mailbox_alloc(ns->list, mailbox, MAILBOX_FLAG_IGNORE_ACLS);
 }
 
-static int
-doveadm_mailbox_find_and_open(struct mail_user *user, const char *mailbox,
-			      struct mailbox **box_r)
-{
-	struct mailbox *box;
-
-	box = doveadm_mailbox_find(user, mailbox);
-	if (mailbox_open(box) < 0) {
-		i_error("Opening mailbox %s failed: %s", mailbox,
-			mailbox_get_last_error(box, NULL));
-		mailbox_free(&box);
-		return -1;
-	}
-	*box_r = box;
-	return 0;
-}
-
-int doveadm_mailbox_find_and_sync(struct mail_user *user, const char *mailbox,
-				  struct mailbox **box_r)
-{
-	if (doveadm_mailbox_find_and_open(user, mailbox, box_r) < 0)
-		return -1;
-	if (mailbox_sync(*box_r, MAILBOX_SYNC_FLAG_FULL_READ) < 0) {
-		i_error("Syncing mailbox %s failed: %s", mailbox,
-			mailbox_get_last_error(*box_r, NULL));
-		mailbox_free(box_r);
-		mailbox_free(box_r);
-		return -1;
-	}
-	return 0;
-}
-
 struct mail_search_args *
 doveadm_mail_build_search_args(const char *const args[])
 {
diff -r 1c2e42bf8825 -r cff670d68f69 src/doveadm/doveadm-mail.h
--- a/src/doveadm/doveadm-mail.h	Sat May 09 19:35:31 2015 +0300
+++ b/src/doveadm/doveadm-mail.h	Sat May 09 19:39:39 2015 +0300
@@ -146,8 +146,6 @@
 
 struct mailbox *
 doveadm_mailbox_find(struct mail_user *user, const char *mailbox);
-int doveadm_mailbox_find_and_sync(struct mail_user *user, const char *mailbox,
-				  struct mailbox **box_r);
 struct mail_search_args *
 doveadm_mail_build_search_args(const char *const args[]);
 void doveadm_mailbox_args_check(const char *const args[]);


More information about the dovecot-cvs mailing list