summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-plugin.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Fixed compilation warnings with gcc-7.2.0Thierry Bultel1-2/+2
Replaced some 'size_t' by 'int' Change-Id: Iaf58b4b65f9aa2e82c0a87af45f21ca62fa4d84e Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-13Good usage of strncat and strncpyRomain Forlot1-8/+13
This change ensure that there are no write over the destination buffer size Change-Id: Ic213e70fab83dfae39a8ff030c823a6ce68aab64 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Change lua2c JSON syntax.Romain Forlot1-6/+16
Clearer JSON writing config. Schema provide informations about objects Change-Id: I55e7c9bef442abaa577c59ab2005da1f315f9312 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: changes key name.Romain Forlot1-1/+1
We could have several file Change-Id: Ia612cb6989a05cc47505ec8975ae825be160af2a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Use new version of function GetBindingDirPathRomain Forlot1-11/+11
That follow the last update in afb-helpers submodule used. Change-Id: Ia6149ae96c1591f3d0791f4263e8beafbe6e764d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatRomain Forlot1-33/+34
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Loads l2c functions per plugin.Romain Forlot1-33/+39
L2C functions are prefixed with either the chosen prefix or plugin uid by default. Change-Id: Id296ec629c803ab06cd05f5278fed3c48cbcf10e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Upgrade config schemaRomain Forlot1-71/+163
Change the way to load LUA scripts. They are now considerate as Plugin and loads with them. This imply rework of how to search and find plugins as well as the way to load LUA. Also load an harcoded LUA scripts providing LUA helpers and managing global variables lock unlock mechanism Change-Id: I64e38aa27278d0cfdca787155db2d0c89953f905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix conversion compilation warningRomain Forlot1-2/+2
Change-Id: I0d5350c1e454bc118e4470ae7ff0eafe253cd2bf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add binding rootdir to searched path for conf and pluginsRomain Forlot1-1/+13
Change-Id: I4526dd9afc76ac9c63ecb6e800157a0678485955 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix segfault when no l2c functions definedRomain Forlot1-1/+1
Mark "ldpath" parameter as optional like it is. Change-Id: If32e078f5a4349ab895b1fd4b8f0a8c542d247a1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back on track l2c functions.Romain Forlot1-6/+27
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix warning compile about uninitialized variableRomain Forlot1-2/+2
Change-Id: I5b07409a7d7c9b5e038accb973b3232775e40c23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Avoid compile warning, memory leaks, lintingRomain Forlot1-0/+3
Change-Id: Ida18aeab20d5b894609c1a9c2f6fc2a71a0b4a23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13wrong json unpacking fails.Romain Forlot1-1/+1
Change-Id: Ie0246192b014c3550207fab1fb6512aeb6e5bce1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Get back lua2c functions parsed at plugin loadRomain Forlot1-4/+11
Format JSON unpack operations Change-Id: Iaed0988d8536ad1df60a32a610e69e35485fc9f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix: strncpy does't add null char at the endRomain Forlot1-2/+2
Fix: handle null response from CtlScanConfig() Change-Id: Icbe2a649886998078adda35b0d0dfd1c46e8fe31 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Load afb_binding macros and stuff to pluginsRomain Forlot1-9/+24
Change-Id: I18a70e929530bb1cd5f7f68962edf975521b1c71 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13fix: wrong usage of strncat and strncpy functionRomain Forlot1-5/+5
3rd arguments match strlen of 2nd arguments and should not match the maximum length of destination variable. Change-Id: Ifebf6097bb995d0cf2c5633eb94d52d4517ade7b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13FormatingRomain Forlot1-22/+22
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13First working version as submoduleFulup Ar Foll1-9/+9
2018-12-131st V2/pre-V3 versionfulup1-29/+35
2018-12-13Remove NetbeansFulup Ar Foll1-0/+219