aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-14 09:18:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-14 09:18:22 +0800
commit0a3527f16f863067c322577cb7c9a7187038bf0e (patch)
treeb0ccae1ee7d9507e961249d0c1814e197072d97e
parentdbdadb9592ad51426bca0439766d5c22e0e295ee (diff)
downloadgsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.gz
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.bz2
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.lz
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.xz
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.zst
gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.zip
Perform some sanity checking on the auto-check-timeout value.
2003-01-13 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (account_new_from_xml): Perform some sanity checking on the auto-check-timeout value. svn path=/trunk/; revision=19435
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-config.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index daea6acd7d..645bb3be7a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2003-01-13 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-config.c (account_new_from_xml): Perform some sanity
+ checking on the auto-check-timeout value.
+
* folder-browser.c (folder_browser_copy): Correctly create the
clipboard buffer by using a nul to delimit the uri and the list of
uids.
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 3864f57e8c..6017da17b6 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -379,11 +379,19 @@ account_new_from_xml (char *in)
cur = cur->next;
}
} else if (!strcmp (node->name, "source")) {
+ int timeout;
+
account->source = g_new0 (MailConfigService, 1);
account->source->save_passwd = xml_get_bool (node, "save-passwd");
account->source->keep_on_server = xml_get_bool (node, "keep-on-server");
account->source->auto_check = xml_get_bool (node, "auto-check");
- account->source->auto_check_time = xml_get_int (node, "auto-check-timeout");
+ timeout = xml_get_int (node, "auto-check-timeout");
+ if (account->source->auto_check && timeout <= 0) {
+ account->source->auto_check = FALSE;
+ account->source->auto_check_time = 0;
+ } else {
+ account->source->auto_check_time = timeout;
+ }
cur = node->children;
while (cur != NULL) {