aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {