#include <sys/socket.h>
#include <sys/types.h>
-#include <linux/types.h>
-#include <linux/netlink.h>
-
#include <libubox/blobmsg_json.h>
#include <libubox/json_script.h>
#include <libubox/runqueue.h>
{
struct trigger *t = container_of(ctx, struct trigger, jctx);
+ if (strcmp(name, t->type) != 0)
+ return NULL;
+
return json_script_file_from_blobmsg(t->type, t->rule, blob_pad_len(t->rule));
}
{
struct trigger *t = container_of(tout, struct trigger, delay);
- json_script_run(&t->jctx, "foo", t->data);
+ json_script_run(&t->jctx, t->type, t->data);
free(t->data);
t->data = NULL;
}
t->data = blob_memdup(data);
uloop_timeout_set(&t->delay, t->timeout);
} else {
- json_script_run(&t->jctx, "foo", data);
+ json_script_run(&t->jctx, t->type, data);
}
}
}