From b472a084900033089e6a3d126369fd2fd9a82d00 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Thu, 15 Apr 2010 19:31:04 +0200 Subject: [PATCH] If conf.status_timing is 0 launch one time --- src/config.c | 2 +- src/wmfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index cbb7281..f50872d 100644 --- a/src/config.c +++ b/src/config.c @@ -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; diff --git a/src/wmfs.c b/src/wmfs.c index 9464a6c..5705126 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -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); }