From bbb4351eab7476be9a93f0248860ac0d1574d8a6 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 26 Sep 2017 12:17:55 +0200 Subject: Make calling lua2c function from lua works Change-Id: I56d78a3fe567d1f7a6c675f6a56473f96d325c85 Signed-off-by: Romain Forlot --- plugins/lua2c-interface.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/lua2c-interface.c b/plugins/lua2c-interface.c index 0bff8d6..1da8f17 100644 --- a/plugins/lua2c-interface.c +++ b/plugins/lua2c-interface.c @@ -33,11 +33,11 @@ CTLP_REGISTER("lua2c-interface"); typedef struct { struct pluginCBT* pluginHandle; -} lowCANCtxT; +} CtxT; // Call at initialisation time CTLP_ONLOAD(plugin, handle) { - lowCANCtxT *pluginCtx= (lowCANCtxT*)calloc (1, sizeof(lowCANCtxT)); + CtxT *pluginCtx= (CtxT*)calloc (1, sizeof(CtxT)); pluginCtx->pluginHandle = (struct pluginCBT*)handle; AFB_NOTICE ("Low-can plugin: label='%s' version='%s' info='%s'", @@ -48,8 +48,9 @@ CTLP_ONLOAD(plugin, handle) { return (void*)pluginCtx; } -CTLP_LUA2C (_setsignalValue, label, argsJ) +CTLP_LUA2C (setSignalValueWrap, label, argsJ) { AFB_NOTICE("label: %s, argsJ: %s", label, json_object_to_json_string(argsJ)); + return 0; } -- cgit 1.2.3-korg