From f48b4a3744c5b084a7009c1635f7b4315de22f6c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 6 May 2009 18:24:03 +0000 Subject: contrib/package/freifunk-watchdog: fixup build and package dependencies, fix hysteresis counter if both bssid and channel are wrong --- contrib/package/freifunk-watchdog/src/watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/package/freifunk-watchdog/src/watchdog.c') diff --git a/contrib/package/freifunk-watchdog/src/watchdog.c b/contrib/package/freifunk-watchdog/src/watchdog.c index b431b6dae..d4ccff822 100644 --- a/contrib/package/freifunk-watchdog/src/watchdog.c +++ b/contrib/package/freifunk-watchdog/src/watchdog.c @@ -69,7 +69,7 @@ static int iw_get_channel(int iwfd, const char *ifname, int *channel) } for(i = 0; i < range->num_frequency; i++) - { + { cmp_freq = ((double)range->freq[i].m) * pow(10, range->freq[i].e); if( cmp_freq == cur_freq ) { @@ -302,7 +302,7 @@ static int do_daemon(void) } /* Check channel */ - if( channel != curif->channel ) + else if( channel != curif->channel ) { syslog(LOG_WARNING, "Channel mismatch on %s: current=%d wanted=%d", curif->ifname, channel, curif->channel); -- cgit v1.2.3