summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-watchdog/src
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-09 15:28:37 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-09 15:28:37 +0000
commit95814fcd1af5061071a96305f28f43f537911290 (patch)
treed2f122494ae0b2d20d4ce255ef710918c3505613 /contrib/package/freifunk-watchdog/src
parentb385476f7ed531532acc9fe356dad18988db8109 (diff)
contrib/package/freifunk-watchdog: better handle checking for uci updates
Diffstat (limited to 'contrib/package/freifunk-watchdog/src')
-rw-r--r--contrib/package/freifunk-watchdog/src/watchdog.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/contrib/package/freifunk-watchdog/src/watchdog.c b/contrib/package/freifunk-watchdog/src/watchdog.c
index d4ccff8221..c269f22d02 100644
--- a/contrib/package/freifunk-watchdog/src/watchdog.c
+++ b/contrib/package/freifunk-watchdog/src/watchdog.c
@@ -137,7 +137,7 @@ static int check_uci_update(const char *config, time_t *mtime)
struct stat s;
char path[128];
- snprintf(path, sizeof(path), "/etc/config/%s", config);
+ snprintf(path, sizeof(path), "/var/state/%s", config);
if( stat(path, &s) > -1 )
{
if( (*mtime == 0) || (s.st_mtime > *mtime) )
@@ -145,20 +145,8 @@ static int check_uci_update(const char *config, time_t *mtime)
*mtime = s.st_mtime;
return 1;
}
- else
- {
- snprintf(path, sizeof(path), "/var/state/%s", config);
- if( stat(path, &s) > -1 )
- {
- if( (*mtime == 0) || (s.st_mtime > *mtime) )
- {
- *mtime = s.st_mtime;
- return 1;
- }
- }
- return 0;
- }
+ return 0;
}
return -1;