X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=ubus.c;h=d5a7007a08dd47172a517dee68c9ba705fc1ee57;hp=5d9d921e899b607c296e254bc7e2319a215dfd28;hb=6d5ca67a135a552a4232bc21705d33a567d00acc;hpb=f9d0f688fa84f53dfde9bb2c0f04ec2528cf8a14 diff --git a/ubus.c b/ubus.c index 5d9d921..d5a7007 100644 --- a/ubus.c +++ b/ubus.c @@ -57,10 +57,20 @@ netifd_handle_restart(struct ubus_context *ctx, struct ubus_object *obj, return 0; } +static int +netifd_handle_reload(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, + struct blob_attr *msg) +{ + netifd_reload(); + return 0; +} + static struct ubus_method main_object_methods[] = { UBUS_METHOD("add_device", netifd_handle_device, dev_policy), UBUS_METHOD("remove_device", netifd_handle_device, dev_policy), { .name = "restart", .handler = netifd_handle_restart }, + { .name = "reload", .handler = netifd_handle_reload }, }; static struct ubus_object_type main_object_type =