dovecot-2.2: imapc: Added IMAPC_DEFAULT_MAX_IDLE_TIME macro.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 26 18:01:30 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/fd863826c892
changeset: 15153:fd863826c892
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 24 14:16:32 2012 +0300
description:
imapc: Added IMAPC_DEFAULT_MAX_IDLE_TIME macro.
diffstat:
src/lib-imap-client/imapc-client.h | 3 +++
src/lib-storage/index/imapc/imapc-settings.c | 6 +++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r f818f65f1a7f -r fd863826c892 src/lib-imap-client/imapc-client.h
--- a/src/lib-imap-client/imapc-client.h Sat Sep 22 19:23:15 2012 +0300
+++ b/src/lib-imap-client/imapc-client.h Mon Sep 24 14:16:32 2012 +0300
@@ -1,6 +1,9 @@
#ifndef IMAPC_CLIENT_H
#define IMAPC_CLIENT_H
+/* IMAP RFC defines this to be at least 30 minutes. */
+#define IMAPC_DEFAULT_MAX_IDLE_TIME (60*29)
+
enum imapc_command_state {
IMAPC_COMMAND_STATE_OK,
IMAPC_COMMAND_STATE_NO,
diff -r f818f65f1a7f -r fd863826c892 src/lib-storage/index/imapc/imapc-settings.c
--- a/src/lib-storage/index/imapc/imapc-settings.c Sat Sep 22 19:23:15 2012 +0300
+++ b/src/lib-storage/index/imapc/imapc-settings.c Mon Sep 24 14:16:32 2012 +0300
@@ -50,7 +50,7 @@
.imapc_features = "",
.imapc_rawlog_dir = "",
.imapc_list_prefix = "",
- .imapc_max_idle_time = 60*29,
+ .imapc_max_idle_time = IMAPC_DEFAULT_MAX_IDLE_TIME,
.ssl_crypto_device = ""
};
@@ -131,6 +131,10 @@
return FALSE;
}
#endif
+ if (set->imapc_max_idle_time == 0) {
+ *error_r = "imapc_max_idle_time must not be 0";
+ return FALSE;
+ }
if (imapc_settings_parse_features(set, error_r) < 0)
return FALSE;
return TRUE;
More information about the dovecot-cvs
mailing list