Add sanity check for background timeout value.

SVN revision: 20403
This commit is contained in:
Kim Woelders 2006-02-11 17:05:08 +00:00
parent f40181876b
commit 25da17e28a
1 changed files with 4 additions and 1 deletions

View File

@ -1481,8 +1481,11 @@ BackgroundsAccounting(void)
static void
BackgroundsTimeout(int val __UNUSED__, void *data __UNUSED__)
{
if (Conf.backgrounds.timeout <= 0)
Conf.backgrounds.timeout = 1;
BackgroundsAccounting();
/* RemoveTimerEvent("BACKGROUND_ACCOUNTING_TIMEOUT"); */
DoIn("BACKGROUND_ACCOUNTING_TIMEOUT", 1.0 * Conf.backgrounds.timeout,
BackgroundsTimeout, 0, NULL);
}