From 0a3527f16f863067c322577cb7c9a7187038bf0e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 14 Jan 2003 01:18:22 +0000 Subject: Perform some sanity checking on the auto-check-timeout value. 2003-01-13 Jeffrey Stedfast * mail-config.c (account_new_from_xml): Perform some sanity checking on the auto-check-timeout value. svn path=/trunk/; revision=19435 --- mail/ChangeLog | 3 +++ mail/mail-config.c | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'mail') 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 + * 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) { -- cgit v1.2.3