summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-12-17 15:02:06 +0100
committerFelix Fietkau <nbd@openwrt.org>2015-12-19 12:28:27 +0100
commit6a84e770ed9f4ea0ffe9b20625f8f15868f5424b (patch)
tree76b0a4e871ff0f595e3e087b68d47315b21b1cbc /ubus.c
parent245527193e90906451be35c2b8e972b8712ea6ab (diff)
interface: Trigger interface update event when interface data is updated via ubus
Interface update event will trigger an interface hotplug event and an ubus notify event which will inform subscribers about the updated interface data field Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/ubus.c b/ubus.c
index 90ee795..454b42d 100644
--- a/ubus.c
+++ b/ubus.c
@@ -891,18 +891,10 @@ netifd_handle_set_data(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *msg)
{
struct interface *iface;
- struct blob_attr *cur;
- int rem, ret;
iface = container_of(obj, struct interface, ubus);
- blob_for_each_attr(cur, msg, rem) {
- ret = interface_add_data(iface, cur);
- if (ret)
- return ret;
- }
-
- return 0;
+ return interface_parse_data(iface, msg);
}
static struct ubus_method iface_object_methods[] = {