summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-09 17:56:51 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-09-09 17:56:51 +0200
commit275a09d6c5ca1c1b03cfc74a5f856c7304adc80c (patch)
tree1fefe9e0fa5217a6a34280de655b3255b1c852ad /ubus.c
parent8ddaf5d7688b14590f283b2ebb81f78326fb39fd (diff)
add an ubus call for restarting netifd
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ubus.c b/ubus.c
index c914cc5..c8f178c 100644
--- a/ubus.c
+++ b/ubus.c
@@ -47,9 +47,19 @@ netifd_handle_device(struct ubus_context *ctx, struct ubus_object *obj,
return 0;
}
+static int
+netifd_handle_restart(struct ubus_context *ctx, struct ubus_object *obj,
+ struct ubus_request_data *req, const char *method,
+ struct blob_attr *msg)
+{
+ netifd_restart();
+ 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 },
};
static struct ubus_object_type main_object_type =