Age | Commit message (Collapse) | Author | Files | Lines |
|
Change the default GLOB pattern because the lua should be found in
var directory by default.
Change-Id: I8be0e85c97459553e1d6a9f58efa394eb311a514
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I020a1619c94a3a22d66e6657f64d4cedda3a1e62
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This will indicates what is the error at the LUA file loading
Change-Id: I258bf43a2200577998e05cf7b2253bdd510a468e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
There was a leack after poping arguments from Lua interpreter.
Now when a Lua2C function is called, if there is something to keep
from the argument then you should call json_object_get() on it
to preserve it.
Change-Id: I43e79ed73a507ac2ca7ed4cdc3f16ec009392194
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Prefix is the most reliable variable to find files or
variables for a controller, so this lets you access it
wherever it is needed without using global hardcoded
variables.
This helps to search for controller's plugins in several
locations depending on environment variables and hardcoded
variables (CONTROL_PLUGIN_PATH, CONTROL_CONFIG_PATH).
This implies also a change a LUA interpreter loading step to
correctly set the package.path variables with the environment
variables, too.
Correct the missing 'extern' in function declarations.
Depends-On: Ic448ff017e6158bec05895d63688b8968b5c6434
Change-Id: I0ad19242612559d1f4b66b6f9af9e7032d4675a8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
change LUA_FIST_ARG into LUA_FIRST_ARG
Change-Id: Ie084e78f68dd0a29c4dfc8387200be9af5180647
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
|
|
added LockWait to wait for incoming events, as soon as an event is
received, the wait is unlocked
You can indicate the timeout
Change-Id: If29ca754618edb5b9fdc32c1c40b47016c6fc88a
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
|
|
Set package.path lua variable use the CONTROL_PLUGIN_PATH
as it could have to find external lua packages in those
directories.
Change-Id: Iebea763782cfc024c5fef1fdbefe8ed80dbc4dbb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Still print a notice message when pushing a null object because having
a null object in LUA may be problematic and it's always a good idea to
warn developer.
Also use json_object_to_json_string (safer than json_object_get_string
in case of object is not a string) to dump json object in notice/debug
messages.
Change-Id: Ia3c252f38cbeca872b8f8fab1589da85d71a51ec
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Change-Id: I0a3a1db6dacf017ecea5b91dc35eb3ec2d86515d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Call to json_object_put seems no longer needed in LuaAfbSuccess.
Change-Id: I2ee850605633b953217b3ad52a4a11059e841be3
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Change-Id: Idb3cb8ebe94cc1670e8757c6ff713ab7ef107a8b
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Also change event message from notice to debug level.
Change-Id: I8dc891343ee7f744ea0e3c07455806eaf34c1d7e
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Reduced the number of warnings in native host configuration (here
Tumbleweed) in order to not hide true/real warnings that may appear
in the future.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Increase lua script max message size to avoid app-controller
warning messages when a lua print message is too long with
4a-softmixer.
Change-Id: I3c2496ea3e5bd971b7682328f7a6227e36b6d706
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Replaced some 'size_t' by 'int'
Change-Id: Iaf58b4b65f9aa2e82c0a87af45f21ca62fa4d84e
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
It is already mandatory from a JSON schema point of view
so here it should be the same. Also it simplifies the process
avoiding the guess and deduction...
Change-Id: I3197b4c7798589f4c62814407909270cdabd1dae
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change-Id: I4ee750f4d95e9fe47352e6cd1dfaeaa94c292e30
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Signature was wrong since last modification about
controller and lua integration that now transport
source informations.
Change-Id: I8f98415b55978e6b7221415ad6169e8d2bc1c959
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ibb7dbc32580100c588d06e283abb57cc37875312
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ied901f39cd6814e5afd9811248b0a1fb401f3e76
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Split and cleaner function that load from JSON object
an object CtlActionT that could be used by the controller.
Also use a new syntax that reduce the number of JSON fields
to parse based on a URI syntax.
Change-Id: Iabc447368ca56e3a4279fb728ba2f546e11c961b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change-Id: I0d5350c1e454bc118e4470ae7ff0eafe253cd2bf
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I2423376e9c0c616ba62439b387f7da23f710dbb0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I24b0b0f87f1315220cf668c170fc3c13a85f46bb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I5ba04ecfb7809f9132e7958c5044b3d821830e8a
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ieb4801b9162f9f8f374b352fb66bed82a8854b7f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I8425f0de60a35b4e287c8829fe72cbca80bc55df
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: Ida18aeab20d5b894609c1a9c2f6fc2a71a0b4a23
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
ScanForConfig return null when no files found which isn't
handled until now.
Change-Id: I70d6b4a45be9d434aca049e3cd3260dfc38a7ff7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Format JSON unpack operations
Change-Id: Iaed0988d8536ad1df60a32a610e69e35485fc9f8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Fix: handle null response from CtlScanConfig()
Change-Id: Icbe2a649886998078adda35b0d0dfd1c46e8fe31
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
th Please enter the commit message for your changes. Lines starting
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
|
|
* error: format not a string literal and no format arguments [-Werror=format-security]
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
|
|
|
|
Change-Id: I2b805a60b67db1a72b429093256999673e2c3964
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
|
|
|
|
|