function remove_client_by_mac()

in fbwifi/files/fbwifi/usr/lib/lua/fbwifi.lua [47:60]


function remove_client_by_mac(client)
    state = uci.cursor("/var/state", "/tmp/fbwifi")

    for key, value in pairs(client) do
        if
            key == 'mac' and
            value == mac_to_purge
        then
            log.syslog(log.LOG_INFO, string.format("[fbwifi] Purging DB entry %s for MAC %s", client['.name'] or 'unknown', mac_to_purge) )
            state:delete("fbwifi", client['.name'])
            return
        end
    end
end