Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gluon-respondd: fix missing section "wifi" for request type "neighbours" #2599

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package/gluon-respondd/src/respondd-neighbours.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ static struct json_object * get_wifi(void) {
struct json_object *ret = json_object_new_object();

struct uci_package *p;
if (uci_load(ctx, "network", &p))
if (uci_load(ctx, "wireless", &p))
goto end;


struct uci_element *e;
uci_foreach_element(&p->sections, e) {
struct uci_section *s = uci_to_section(e);
if (strcmp(s->type, "interface"))
if (strcmp(s->type, "wifi-iface"))
continue;

const char *proto = uci_lookup_option_string(ctx, s, "proto");
if (!proto || strcmp(proto, "gluon_mesh"))
const char *proto = uci_lookup_option_string(ctx, s, "mode");
if (!proto || strcmp(proto, "mesh"))
continue;

const char *ifname = uci_lookup_option_string(ctx, s, "ifname");
Expand Down