diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-12-03 19:10:58 +0100 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-12-04 15:09:01 +0100 |
commit | 3dd9b3710a6724538c9b87581a1d7182808f3ba3 (patch) | |
tree | 5f8763f58db0021ffff01d08b3ec40e445121853 /ctl-lib/ctl-lua.c | |
parent | b39c6883f7d7d58d60178441c8d408118788418b (diff) |
Improve plugin search path
In controller 'plugin' section, use only paths available with 'spath'
key to search for plugins.
Multiple paths can be specified using ':' character as separator.
Environment variables can be used in paths.
If a path is not absolute, it will be added two times to
search paths list, one with binder root directory as prefix,
and one with binding parent directory.
BUG-AGL: SPEC-3011
Change-Id: I1e3fd64d523d36a0e0982bbd31d66ae8d9960d3c
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-lua.c')
-rw-r--r-- | ctl-lib/ctl-lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index 5509385..f3f0dce 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -713,7 +713,7 @@ static int LuaAfbGetRootDir(lua_State* luaState) { } // extract and return afbSource from timer handle - lua_pushstring(luaState, GetBindingDirPath(source->api)); + lua_pushstring(luaState, GetAFBRootDirPath(source->api)); return 1; // return argument } @@ -1377,7 +1377,7 @@ int LuaConfigLoad(afb_api_t apiHandle, const char *prefix) { // set package.path lua variable use the CONTROL_PLUGIN_PATH as it could // have to find external lua packages in those directories - spath = GetDefaultPluginSearchPath(apiHandle, prefix); + spath = GetDefaultPluginSearchPath(apiHandle); base_len = strlen(LUA_PATH_VALUE); spath_len = strlen(spath); |