dovecot-1.2: Made CRITICAL_MSG* public to MAIL_ERRSTR_CRITICAL_M...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Nov 16 04:46:19 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/106ad33091ca
changeset: 8417:106ad33091ca
user: Timo Sirainen <tss at iki.fi>
date: Sun Nov 16 04:45:06 2008 +0200
description:
Made CRITICAL_MSG* public to MAIL_ERRSTR_CRITICAL_MSG* in mail-error.h.
diffstat:
4 files changed, 15 insertions(+), 15 deletions(-)
src/lib-storage/mail-error.h | 6 ++++++
src/lib-storage/mail-storage.c | 10 +++-------
src/lib-storage/mail-storage.h | 4 +++-
src/lib-storage/mailbox-list.c | 10 +++-------
diffs (84 lines):
diff -r f5d753c4c8c6 -r 106ad33091ca src/lib-storage/mail-error.h
--- a/src/lib-storage/mail-error.h Sun Nov 16 04:21:02 2008 +0200
+++ b/src/lib-storage/mail-error.h Sun Nov 16 04:45:06 2008 +0200
@@ -9,6 +9,12 @@
/* And just for making error strings consistent: */
#define MAIL_ERRSTR_NO_SPACE "Not enough disk space"
#define MAIL_ERRSTR_LOCK_TIMEOUT "Timeout while waiting for lock"
+
+/* Message to show to users when critical error occurs */
+#define MAIL_ERRSTR_CRITICAL_MSG \
+ "Internal error occurred. Refer to server log for more information."
+#define MAIL_ERRSTR_CRITICAL_MSG_STAMP \
+ MAIL_ERRSTR_CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
#define T_MAIL_ERR_MAILBOX_NOT_FOUND(name) \
t_strdup_printf(MAIL_ERRSTR_MAILBOX_NOT_FOUND, name)
diff -r f5d753c4c8c6 -r 106ad33091ca src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c Sun Nov 16 04:21:02 2008 +0200
+++ b/src/lib-storage/mail-storage.c Sun Nov 16 04:45:06 2008 +0200
@@ -15,11 +15,6 @@
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
-
-/* Message to show to users when critical error occurs */
-#define CRITICAL_MSG \
- "Internal error occurred. Refer to server log for more information."
-#define CRITICAL_MSG_STAMP CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
#define DEFAULT_MAX_KEYWORD_LENGTH 50
@@ -294,8 +289,9 @@ void mail_storage_set_internal_error(str
i_free(storage->error_string);
storage->error_string =
- strftime(str, sizeof(str), CRITICAL_MSG_STAMP, tm) > 0 ?
- i_strdup(str) : i_strdup(CRITICAL_MSG);
+ strftime(str, sizeof(str),
+ MAIL_ERRSTR_CRITICAL_MSG_STAMP, tm) > 0 ?
+ i_strdup(str) : i_strdup(MAIL_ERRSTR_CRITICAL_MSG);
storage->error = MAIL_ERROR_TEMP;
}
diff -r f5d753c4c8c6 -r 106ad33091ca src/lib-storage/mail-storage.h
--- a/src/lib-storage/mail-storage.h Sun Nov 16 04:21:02 2008 +0200
+++ b/src/lib-storage/mail-storage.h Sun Nov 16 04:45:06 2008 +0200
@@ -39,7 +39,9 @@ enum mail_storage_flags {
MAIL_STORAGE_FLAG_NFS_FLUSH_STORAGE = 0x800,
MAIL_STORAGE_FLAG_NFS_FLUSH_INDEX = 0x1000,
/* Don't use fsync() or fdatasync() */
- MAIL_STORAGE_FLAG_FSYNC_DISABLE = 0x2000
+ MAIL_STORAGE_FLAG_FSYNC_DISABLE = 0x2000,
+ /* Force opening mailbox and ignoring any ACLs */
+ MAIL_STORAGE_FLAG_IGNORE_ACLS = 0x4000
};
enum mailbox_open_flags {
diff -r f5d753c4c8c6 -r 106ad33091ca src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c Sun Nov 16 04:21:02 2008 +0200
+++ b/src/lib-storage/mailbox-list.c Sun Nov 16 04:45:06 2008 +0200
@@ -23,11 +23,6 @@
long mailbox names. */
#define MAILBOX_MAX_HIERARCHY_LEVELS 20
#define MAILBOX_MAX_HIERARCHY_NAME_LENGTH 200
-
-/* Message to show to users when critical error occurs */
-#define CRITICAL_MSG \
- "Internal error occurred. Refer to server log for more information."
-#define CRITICAL_MSG_STAMP CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
struct ns_list_iterate_context {
struct mailbox_list_iterate_context ctx;
@@ -780,8 +775,9 @@ void mailbox_list_set_internal_error(str
i_free(list->error_string);
list->error_string =
- strftime(str, sizeof(str), CRITICAL_MSG_STAMP, tm) > 0 ?
- i_strdup(str) : i_strdup(CRITICAL_MSG);
+ strftime(str, sizeof(str),
+ MAIL_ERRSTR_CRITICAL_MSG_STAMP, tm) > 0 ?
+ i_strdup(str) : i_strdup(MAIL_ERRSTR_CRITICAL_MSG);
list->error = MAIL_ERROR_TEMP;
}
More information about the dovecot-cvs
mailing list