From: Jo-Philipp Wich Date: Sat, 9 May 2009 15:29:15 +0000 (+0000) Subject: luci-0.8: merge r4491 X-Git-Tag: 0.8.7~44 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8ecde162bae741bac890dd0732834afaee7a1f58;p=oweals%2Fluci.git luci-0.8: merge r4491 --- diff --git a/contrib/package/freifunk-watchdog/src/watchdog.c b/contrib/package/freifunk-watchdog/src/watchdog.c index d4ccff822..c269f22d0 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;