summaryrefslogtreecommitdiffstats
path: root/controller/ctl-plugin.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-17 19:20:40 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit12097251ec058b1fa9d9202998c829b27ee5554f (patch)
tree415d2592913bfa0b980232ffbee09d6cfb48fd02 /controller/ctl-plugin.c
parent5bbc6cb56995d23cb8a4eb584ef0161be092da1f (diff)
Get CPP controller plugin works
Context passing variables not working well Change-Id: Ibc67bef353e5cc2e53ef9e5579d106baab92a604 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-plugin.c')
-rw-r--r--controller/ctl-plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/controller/ctl-plugin.c b/controller/ctl-plugin.c
index b14d591..69f0f09 100644
--- a/controller/ctl-plugin.c
+++ b/controller/ctl-plugin.c
@@ -21,6 +21,9 @@
#define _GNU_SOURCE
#include <string.h>
#include <dlfcn.h>
+#include <link.h>
+#include <stdio.h>
+#include <stdlib.h>
#ifdef CONTROL_SUPPORT_LUA
#include "ctl-lua.h"
@@ -202,7 +205,8 @@ STATIC int PluginLoadOne (CtlPluginT *ctlPlugin, json_object *pluginJ, void* han
}
}
#endif
- DispatchPluginInstallCbT ctlPluginOnload = dlsym(dlHandle, "CtlPluginOnload");
+
+DispatchPluginInstallCbT ctlPluginOnload = dlsym(dlHandle, "CtlPluginOnload");
if (ctlPluginOnload) {
ctlPlugin->context = (*ctlPluginOnload) (ctlPlugin, handle);
}