summaryrefslogtreecommitdiff
path: root/plugin.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-07 02:56:48 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-07 02:56:48 +0100
commitf8573c7b4c3a9e1a67cae787690f27a976aee11c (patch)
tree3c12caa8232012458026ed3d7b49fbe445877a3f /plugin.c
parent11cbb4498b2da95ece2ad4ce940ca9cda8b479eb (diff)
add ubus support
Diffstat (limited to 'plugin.c')
-rw-r--r--plugin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugin.c b/plugin.c
index ecf6660..56e049c 100644
--- a/plugin.c
+++ b/plugin.c
@@ -21,6 +21,8 @@
#include "uhttpd.h"
#include "plugin.h"
+static LIST_HEAD(plugins);
+
static const struct uhttpd_ops ops = {
.dispatch_add = uh_dispatch_add,
.path_match = uh_path_match,
@@ -53,5 +55,14 @@ int uh_plugin_init(const char *name)
return -ENOENT;
}
+ list_add(&p->list, &plugins);
return p->init(&ops, &conf);
}
+
+void uh_plugin_post_init(void)
+{
+ struct uhttpd_plugin *p;
+
+ list_for_each_entry(p, &plugins, list)
+ p->post_init();
+}