8000 [bug] 'pairs' on unexpected variable value · Issue #119 · openwisp/openwrt-openwisp-monitoring · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[bug] 'pairs' on unexpected variable value #119
Open
@labertasche42

Description

@labertasche42

I have too many devices and thus even in the normal openwrt 22 cli, ubus call network.device status throws a time out.
Entirely my problem, but through this time out

local network_status = ubus:call('network.device', 'status', {})
gets an unexpected assignment and by this
for name, interface in pairs(network_status) do
fails.
This in turn results in an empty report in this in a HTTP 400 from the openwisp server.

The solution could be to either check every variable, before pairs is used on it and omit this part in the report, if there should be an error, or to abort the whole script, if ubus:call has an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0