if (iface->proto_handler && iface->proto_handler->config_params)
uci_to_blob(&b, s, iface->proto_handler->config_params);
- if (!bridge && uci_to_blob(&b, s, simple_device_type.config_params) > 1)
+ if (!bridge && uci_to_blob(&b, s, simple_device_type.config_params))
iface->device_config = true;
config = blob_memdup(b.head);
if (blob_len(b.head) == 0)
return;
- if (iface->device_config)
- device_set_config(dev, dev->type, b.head);
+ if (iface->device_config || dev->settings.flags)
+ device_apply_config(dev, dev->type, b.head);
return;
error_free_config:
free(config);