|
@@ -195,10 +195,12 @@ local function get_wifi_clients()
|
|
|
-- Query each interface separately
|
|
-- Query each interface separately
|
|
|
local count = 0
|
|
local count = 0
|
|
|
for _, iface in ipairs(interfaces) do
|
|
for _, iface in ipairs(interfaces) do
|
|
|
|
|
+ log_info("Querying: " .. iface)
|
|
|
local f = io.popen("ubus call " .. iface .. " get_clients 2>/dev/null")
|
|
local f = io.popen("ubus call " .. iface .. " get_clients 2>/dev/null")
|
|
|
if f then
|
|
if f then
|
|
|
local result = f:read("*a")
|
|
local result = f:read("*a")
|
|
|
f:close()
|
|
f:close()
|
|
|
|
|
+ log_info(iface .. " result: " .. result:sub(1, 100))
|
|
|
-- Check if there are actually clients (result contains "clients": {})
|
|
-- Check if there are actually clients (result contains "clients": {})
|
|
|
if result:find('"clients"') and not result:find('"clients":%s*{}') then
|
|
if result:find('"clients"') and not result:find('"clients":%s*{}') then
|
|
|
local mac_count = 0
|
|
local mac_count = 0
|