If conf.status_timing is 0 launch one time

This commit is contained in:
Philippe Pepiot 2010-04-15 19:31:04 +02:00
parent 55e74cd849
commit b472a08490
2 changed files with 3 additions and 3 deletions

View File

@ -156,7 +156,7 @@ conf_misc_section(void)
conf.pad = pad;
if(conf.status_timing <= 0)
if(conf.status_timing < 0)
{
warnx("configuration : status_timing value (%d) incorrect.", conf.status_timing);
conf.status_timing = 1;

View File

@ -148,11 +148,11 @@ thread_process(void *arg)
/* Status checking loop with timing */
else
{
while(!exiting)
do
{
spawn(conf.status_path);
sleep(conf.status_timing);
}
} while (!exiting && conf.status_timing != 0);
pthread_exit(0);
}