Patch: add build time option to disable IMAP IDLE support
- From: José Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Patch: add build time option to disable IMAP IDLE support
- Date: Tue, 22 Sep 2009 16:39:00 +0200
Hi,
This patch simply adds a build time option to disable IMAP IDLE
extension support in tinymail. Just, if you put --disable-idle in
autogen/configure, you won't get IDLE support.
This is because the current implementation (based on a busyloop) is
really expensive for power management.
Changelog:
* libtinymail-camel/camel-lite/configure.ac: add new configure option
--disable-idle, so we can disable IDLE support on build time.
* libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c:
if IDLE is disabled, don't parse IDLE capability.
--
José Dapena Paz <jdapena igalia com>
Igalia
diff --git a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
index aaa5764..64bb6f4 100644
--- a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
+++ b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c
@@ -1035,7 +1035,9 @@ static struct {
{ "XGWMOVE", IMAP_CAPABILITY_XGWMOVE },
{ "LOGINDISABLED", IMAP_CAPABILITY_LOGINDISABLED },
{ "CONDSTORE", IMAP_CAPABILITY_CONDSTORE },
+#ifndef DISABLE_IDLE
{ "IDLE", IMAP_CAPABILITY_IDLE },
+#endif
{ "BINARY", IMAP_CAPABILITY_BINARY },
{ "QRESYNC", IMAP_CAPABILITY_QRESYNC },
{ "ENABLE", IMAP_CAPABILITY_ENABLE },
diff --git a/libtinymail-camel/camel-lite/configure.ac b/libtinymail-camel/camel-lite/configure.ac
index a2ad034..a63a4fc 100644
--- a/libtinymail-camel/camel-lite/configure.ac
+++ b/libtinymail-camel/camel-lite/configure.ac
@@ -213,6 +213,18 @@ else
fi
AM_CONDITIONAL(ENABLE_IMAPP, test x$enable_imapp = xyes)
+dnl **************************************************
+dnl IMAP IDLE support.
+dnl **************************************************
+AC_ARG_ENABLE(idle,
+[ --disable-idle Disable IMAP IDLE support],
+[ case "$enableval" in
+ no)
+ AC_DEFINE(DISABLE_IDLE,1,[do not use IMAP IDLE]);;
+ *)
+ ;;
+ esac ], )
+
AC_TNY_FILELOCK_CHECK
AC_TNY_BRKSPOOL_CHECK
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]