luci-0.8: merge r4474
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 6 May 2009 18:25:05 +0000 (18:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 6 May 2009 18:25:05 +0000 (18:25 +0000)
contrib/package/freifunk-watchdog/Makefile
contrib/package/freifunk-watchdog/src/watchdog.c

index 6d36d0958ebff8a3f4fb0adac4aa339d21d51121..403fb9c97debd6f195e013266e8a2e8e85da456e 100644 (file)
@@ -11,6 +11,7 @@ PKG_NAME:=freifunk-watchdog
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+PKG_BUILD_DEPENDS := uci
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -18,6 +19,7 @@ define Package/freifunk-watchdog
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Freifunk Ad-Hoc watchdog daemon
+  DEPENDS:=libuci
 endef
 
 define Package/freifunk-watchdog/description
index b431b6dae4d643516d454c6541875e7cb623e267..d4ccff82215ab0cb9a80b3eedf0d122fe9b89a76 100644 (file)
@@ -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);