contrib/package/freifunk-watchdog: only monitor ad-hoc interfaces

This commit is contained in:
Jo-Philipp Wich 2009-05-16 17:15:11 +00:00
parent e928518ba7
commit 5723346226
2 changed files with 35 additions and 31 deletions

View file

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=freifunk-watchdog
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS := uci

View file

@ -205,6 +205,9 @@ static void load_wifi_uci_add_iface(const char *section, struct uci_itr_ctx *itr
const char *ucitmp;
int val = 0;
ucitmp = ucix_get_option(itr->ctx, "wireless", section, "mode");
if( ucitmp && !strncmp(ucitmp, "adhoc", 5) )
{
if( (t = (wifi_tuple_t *)malloc(sizeof(wifi_tuple_t))) != NULL )
{
ucitmp = ucix_get_option(itr->ctx, "wireless", section, "ifname");
@ -246,6 +249,7 @@ static void load_wifi_uci_add_iface(const char *section, struct uci_itr_ctx *itr
}
}
}
}
/* Load config */
static wifi_tuple_t * load_wifi_uci(wifi_tuple_t *ifs, time_t *modtime)