summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-10 09:25:47 +0200
committerJohn Crispin <blogic@openwrt.org>2013-07-10 09:26:27 +0200
commit4867e5fad5af92416498f3a2935e0727a1211421 (patch)
tree4d769764175d3461be28f9e7106227540e62aaa6
parentd8695bda1728d205fd76a4a5f8b329de418928dc (diff)
downloadunitd-4867e5fad5af92416498f3a2935e0727a1211421.tar
unitd-4867e5fad5af92416498f3a2935e0727a1211421.zip
remove support fro trigegrs not linked to a service
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--service.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/service.c b/service.c
index b5f4f3e..3a21ed0 100644
--- a/service.c
+++ b/service.c
@@ -329,33 +329,6 @@ service_handle_event(struct ubus_context *ctx, struct ubus_object *obj,
return 0;
}
-enum {
- TRIGGER_ATTR,
- __TRIGGER_MAX
-};
-
-static const struct blobmsg_policy trigger_policy[__TRIGGER_MAX] = {
- [TRIGGER_ATTR] = { .name = "triggers", .type = BLOBMSG_TYPE_ARRAY },
-};
-
-static int service_handle_trigger(struct ubus_context *ctx, struct ubus_object *obj,
- struct ubus_request_data *req, const char *method,
- struct blob_attr *msg)
-{
- struct blob_attr *tb[__TRIGGER_MAX];
-
- if (!msg)
- return UBUS_STATUS_INVALID_ARGUMENT;
-
- blobmsg_parse(trigger_policy, __TRIGGER_MAX, tb, blob_data(msg), blob_len(msg));
- if (!tb[TRIGGER_ATTR])
- return UBUS_STATUS_INVALID_ARGUMENT;
-
- trigger_add(tb[TRIGGER_ATTR], NULL);
-
- return 0;
-}
-
static struct ubus_method main_object_methods[] = {
UBUS_METHOD("set", service_handle_set, service_set_attrs),
UBUS_METHOD("add", service_handle_set, service_set_attrs),
@@ -364,7 +337,6 @@ static struct ubus_method main_object_methods[] = {
UBUS_METHOD("update_start", service_handle_update, service_attrs),
UBUS_METHOD("update_complete", service_handle_update, service_attrs),
UBUS_METHOD("event", service_handle_event, event_policy),
- UBUS_METHOD("trigger", service_handle_trigger, trigger_policy),
};
static struct ubus_object_type main_object_type =