diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-14 09:18:22 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-14 09:18:22 +0800 |
commit | 0a3527f16f863067c322577cb7c9a7187038bf0e (patch) | |
tree | b0ccae1ee7d9507e961249d0c1814e197072d97e /mail/mail-config.c | |
parent | dbdadb9592ad51426bca0439766d5c22e0e295ee (diff) | |
download | gsoc2013-evolution-0a3527f16f863067c322577cb7c9a7187038bf0e.tar.gz 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
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |