X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=config.c;h=d3f1986990a664eeefdc6cebc54153254965cbd5;hb=7831c630912c9dc9e592d282ba1f9485c1dff9cc;hp=9f4247125ca752e0fe52a9555171b26ddad0545a;hpb=f8276b9b149f3b0c8f3cdf8d3d0c232bd92e3464;p=project%2Fnetifd.git diff --git a/config.c b/config.c index 9f42471..d3f1986 100644 --- a/config.c +++ b/config.c @@ -331,7 +331,7 @@ config_init_package(const char *config) } void -config_init_interfaces(const char *name) +config_init_interfaces(void) { struct uci_package *p = NULL; struct uci_element *e; @@ -344,6 +344,7 @@ config_init_interfaces(const char *name) uci_network = p; config_init = true; + device_lock(); device_reset_config(); config_init_devices(); @@ -351,13 +352,12 @@ config_init_interfaces(const char *name) uci_foreach_element(&p->sections, e) { struct uci_section *s = uci_to_section(e); - if (name && strcmp(s->e.name, name) != 0) - continue; - if (!strcmp(s->type, "interface")) config_parse_interface(s); } + config_init = false; + device_unlock(); device_reset_old(); device_init_pending();