diff --git a/wireless/wifictld/Makefile b/wireless/wifictld/Makefile index 0ef41e2..7d25c8d 100644 --- a/wireless/wifictld/Makefile +++ b/wireless/wifictld/Makefile @@ -21,7 +21,7 @@ define Package/wifictld $(call Package/wifictld/Default) TITLE+= (full) VARIANT:=full - TARGET_CFLAGS += -DDEBUG -ggdb3 + TARGET_CFLAGS += -DDEBUG -g3 -ggdb3 endef define Package/wifictld-mini diff --git a/wireless/wifictld/src/Makefile b/wireless/wifictld/src/Makefile index 9219088..e89d8b3 100644 --- a/wireless/wifictld/src/Makefile +++ b/wireless/wifictld/src/Makefile @@ -2,7 +2,7 @@ all: hostapd wifictld CC = gcc -CFLAGS = -Wall +CFLAGS = -Wall -Wextra LDFLAGS = -lubox -lubus DEPS = $(wildcard *.h) diff --git a/wireless/wifictld/src/wifi_clients.c b/wireless/wifictld/src/wifi_clients.c index c99852a..3a1d789 100644 --- a/wireless/wifictld/src/wifi_clients.c +++ b/wireless/wifictld/src/wifi_clients.c @@ -14,7 +14,7 @@ int client_signal_threashold = -75; int clean_every = 600; //in ms = 10min int clean_older_then = 3600; //in sec = 1h -struct avl_tree clients_by_addr; +struct avl_tree clients_by_addr = {}; void clean_cbhandler(struct uloop_timeout *t) @@ -70,7 +70,7 @@ struct wifi_client *__get_client(const u8 *address){ return client; } log_debug("wifi_clients.__get_client("MACSTR"): gen new client\n", MAC2STR(address)); - client = calloc(sizeof(*client), 1); + client = malloc(sizeof(*client)); memcpy(client->addr, address, sizeof(client->addr)); client->try_probe = 0; client->try_auth = 0;