dovecot-2.2: lib-storage: Renamed MAIL_FETCH_UIDL_FILE_NAME to M...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 30 15:51:39 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/b631f67f56d3
changeset: 19258:b631f67f56d3
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 30 18:49:39 2015 +0300
description:
lib-storage: Renamed MAIL_FETCH_UIDL_FILE_NAME to MAIL_FETCH_STORAGE_ID.
Keep MAIL_FETCH_UIDL_FILE_NAME for backwards compatibility for now.
diffstat:
src/lib-storage/index/index-mail.c | 2 +-
src/lib-storage/index/maildir/maildir-copy.c | 2 +-
src/lib-storage/index/maildir/maildir-mail.c | 10 +++++-----
src/lib-storage/index/raw/raw-mail.c | 2 +-
src/lib-storage/mail-storage.h | 3 ++-
src/pop3/pop3-commands.c | 2 +-
6 files changed, 11 insertions(+), 10 deletions(-)
diffs (106 lines):
diff -r 22015b472147 -r b631f67f56d3 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c Wed Sep 30 18:11:53 2015 +0300
+++ b/src/lib-storage/index/index-mail.c Wed Sep 30 18:49:39 2015 +0300
@@ -1397,7 +1397,7 @@
return 0;
case MAIL_FETCH_BODY_SNIPPET:
return index_mail_fetch_body_snippet(mail, value_r);
- case MAIL_FETCH_UIDL_FILE_NAME:
+ case MAIL_FETCH_STORAGE_ID:
case MAIL_FETCH_UIDL_BACKEND:
case MAIL_FETCH_SEARCH_RELEVANCY:
case MAIL_FETCH_GUID:
diff -r 22015b472147 -r b631f67f56d3 src/lib-storage/index/maildir/maildir-copy.c
--- a/src/lib-storage/index/maildir/maildir-copy.c Wed Sep 30 18:11:53 2015 +0300
+++ b/src/lib-storage/index/maildir/maildir-copy.c Wed Sep 30 18:49:39 2015 +0300
@@ -91,7 +91,7 @@
return -1;
} else {
/* raw / lda */
- if (mail_get_special(mail, MAIL_FETCH_UIDL_FILE_NAME,
+ if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID,
&path) < 0 || *path == '\0')
return 0;
if (do_hardlink(dest_mbox, path, &do_ctx) < 0)
diff -r 22015b472147 -r b631f67f56d3 src/lib-storage/index/maildir/maildir-mail.c
--- a/src/lib-storage/index/maildir/maildir-mail.c Wed Sep 30 18:11:53 2015 +0300
+++ b/src/lib-storage/index/maildir/maildir-mail.c Wed Sep 30 18:49:39 2015 +0300
@@ -232,7 +232,7 @@
/* if this mail itself has non-pop3 fields we know we're not
pop3-only */
allowed_pop3_fields = MAIL_FETCH_FLAGS | MAIL_FETCH_STREAM_HEADER |
- MAIL_FETCH_STREAM_BODY | MAIL_FETCH_UIDL_FILE_NAME |
+ MAIL_FETCH_STREAM_BODY | MAIL_FETCH_STORAGE_ID |
MAIL_FETCH_VIRTUAL_SIZE;
if (mail->data.wanted_headers != NULL ||
@@ -524,12 +524,12 @@
}
/* default to base filename: */
- if (maildir_mail_get_special(_mail, MAIL_FETCH_UIDL_FILE_NAME,
+ if (maildir_mail_get_special(_mail, MAIL_FETCH_STORAGE_ID,
value_r) < 0)
return -1;
mail->data.guid = mail->data.filename;
return 0;
- case MAIL_FETCH_UIDL_FILE_NAME:
+ case MAIL_FETCH_STORAGE_ID:
if (mail->data.filename != NULL) {
*value_r = mail->data.filename;
return 0;
@@ -561,7 +561,7 @@
} else if (*uidl == '\0') {
/* special optimization case: use the base file name */
return maildir_mail_get_special(_mail,
- MAIL_FETCH_UIDL_FILE_NAME, value_r);
+ MAIL_FETCH_STORAGE_ID, value_r);
} else {
*value_r = p_strdup(mail->mail.data_pool, uidl);
}
@@ -621,7 +621,7 @@
struct maildir_mailbox *mbox = (struct maildir_mailbox *)_mail->box;
const char *fname;
- if (maildir_mail_get_special(_mail, MAIL_FETCH_UIDL_FILE_NAME,
+ if (maildir_mail_get_special(_mail, MAIL_FETCH_STORAGE_ID,
&fname) == 0 &&
strcmp(uidl, fname) == 0) {
/* special case optimization: empty UIDL means the same
diff -r 22015b472147 -r b631f67f56d3 src/lib-storage/index/raw/raw-mail.c
--- a/src/lib-storage/index/raw/raw-mail.c Wed Sep 30 18:11:53 2015 +0300
+++ b/src/lib-storage/index/raw/raw-mail.c Wed Sep 30 18:49:39 2015 +0300
@@ -105,7 +105,7 @@
*value_r = mbox->envelope_sender != NULL ?
mbox->envelope_sender : "";
return 0;
- case MAIL_FETCH_UIDL_FILE_NAME:
+ case MAIL_FETCH_STORAGE_ID:
*value_r = mbox->have_filename ?
mailbox_get_path(_mail->box) : "";
return 0;
diff -r 22015b472147 -r b631f67f56d3 src/lib-storage/mail-storage.h
--- a/src/lib-storage/mail-storage.h Wed Sep 30 18:11:53 2015 +0300
+++ b/src/lib-storage/mail-storage.h Wed Sep 30 18:49:39 2015 +0300
@@ -150,7 +150,8 @@
MAIL_FETCH_IMAP_ENVELOPE = 0x00004000,
MAIL_FETCH_FROM_ENVELOPE = 0x00008000,
MAIL_FETCH_HEADER_MD5 = 0x00010000,
- MAIL_FETCH_UIDL_FILE_NAME = 0x00020000,
+ MAIL_FETCH_STORAGE_ID = 0x00020000,
+#define MAIL_FETCH_UIDL_FILE_NAME MAIL_FETCH_STORAGE_ID /* FIXME: remove in v2.3 */
MAIL_FETCH_UIDL_BACKEND = 0x00040000,
MAIL_FETCH_MAILBOX_NAME = 0x00080000,
MAIL_FETCH_SEARCH_RELEVANCY = 0x00100000,
diff -r 22015b472147 -r b631f67f56d3 src/pop3/pop3-commands.c
--- a/src/pop3/pop3-commands.c Wed Sep 30 18:11:53 2015 +0300
+++ b/src/pop3/pop3-commands.c Wed Sep 30 18:49:39 2015 +0300
@@ -620,7 +620,7 @@
}
}
if ((client->uidl_keymask & UIDL_FILE_NAME) != 0) {
- if (mail_get_special(mail, MAIL_FETCH_UIDL_FILE_NAME,
+ if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID,
&tab[3].value) < 0) {
i_error("UIDL: File name lookup failed: %s",
mailbox_get_last_error(mail->box, NULL));
More information about the dovecot-cvs
mailing list