summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-07-04 18:18:43 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-07-05 16:22:47 +0200
commit64fcae698a48acf6bd7f05d168b5cd4badcf0bd3 (patch)
tree360d22bf5fe8584cafd22acaa93bcf76a3a09440 /signal-composer-binding
parentbf964e8ad085cd051d9a28bcd74aafeeb08c9593 (diff)
Update submodules
Submodule conf.d/app-templates 6e1a3c3..aa68dbd: > Don't overwrite the autobuild script if it exists > Disable the in-tree build method. > Detect Yocto as OS distribution > Fix: wrong compile options added > Fallback using zip format if no wgtpkg-pack found > 02-variables.cmake: Avoid checking CXX version if not required > config.cmake.sample: Remove dependency to libsystemd > config.cmake.sample: Remove dependency to libmicrohttpd > Added -D_FORTIFY_SOURCE=2 to CFLAGS > start-on-target: uses RSYNC_PREFIX path for config > Fixed spelling. > Improve OS detection > Fix: OS detection > Launch from workdir > Change closing that could fix native debugging Submodule ctl-utilities 0129510...1ff524b: > Change LUA package path at LUA interpreter load > Don't load two times a plugin even for LUA > Fixed hidden bound variable (apiHandle) > Fixed null value when push Lua arguments > Adjust to compile with incoming bindings v3 > Remove declaration to not existing functions > Add 2 lua utilities function > Update README.md for new metadata keys. > Fix a compilation issue due to modif of AFB_ReqSuccess > README:md: update README accordingly to new json scheme. > Fixed crash due to call to json_object_put > Fix segfault when printing long message from lua > Fixed spelling of AFB_ReqSuccess > Remove an unnecessary variable > Make parsing of action loading non blocking > Use an external file for app fw functions link > Use macro to test request validity > Fixed build warnings with gcc >= 7.3 > Increase lua script max message size > Prevent lost of config file path when searching > Correct way that api actions are handled in controller > Handle more metadata in the controller. > Add possibility to set prefix to NULL in CtlConfigScan > Fixed compilation warnings with gcc-7.2.0 > Add an external field to CtlConfigT > Make action item from a LUA action mandatory > Handle no prefix given > Good usage of strncat and strncpy > Update to the new JSON syntax > Detect failure at OnLoad action calls > Improve reliability and function calls > Correctly release request JSON object > Add AFB macros > Don't use assert in controller. > Change lua2c JSON syntax. > Search for Event section > Fix: changes key name. > Fix: arguments pointer NULL check > Fix wrong error message. > Simplify action definition > Fix: Dyn API Action loading procedure > Use new version of function GetBindingDirPath > Format > Merge changes from topic 'sandbox/claneys/wip' > Upgrade config schema > Fix: callback execution condition < Format < Fix: callback execution condition < New action loading function. < Upgrade config schema Adapt json config file to new syntax Fix: prefix now add the "-" so it'isn't needed to add it in the prefix at search (signal-composer.cpp) Fix: calling a api verb without json_object fails because of config arguments not retrieved. (sources.cpp) Change-Id: I48c1bca9fbac485e6a34b4645e683d9bdb1cbf2b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding')
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp2
-rw-r--r--signal-composer-binding/signal-composer.cpp2
-rw-r--r--signal-composer-binding/source.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index 0d9c8e3..50eb03b 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -265,7 +265,7 @@ void get(struct afb_req request)
int loadConf()
{
int err = 0;
- std::string bindingDirPath = GetBindingDirPath();
+ std::string bindingDirPath = GetBindingDirPath(nullptr);
std::string rootdir = bindingDirPath + "/etc";
err = Composer::instance().loadConfig(rootdir);
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp
index ce4fe47..4b92f7e 100644
--- a/signal-composer-binding/signal-composer.cpp
+++ b/signal-composer-binding/signal-composer.cpp
@@ -461,7 +461,7 @@ int Composer::loadConfig(std::string& filepath)
if (!dirList) dirList=CONTROL_CONFIG_PATH;
filepath.append(":");
filepath.append(dirList);
- const char *configPath = CtlConfigSearch(nullptr, filepath.c_str(), "control-");
+ const char *configPath = CtlConfigSearch(nullptr, filepath.c_str(), "control");
if (!configPath) {
AFB_ApiError(apiHandle, "CtlPreInit: No control-* config found invalid JSON %s ", filepath.c_str());
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp
index 6832320..d7a5915 100644
--- a/signal-composer-binding/source.cpp
+++ b/signal-composer-binding/source.cpp
@@ -50,7 +50,7 @@ void SourceAPI::init()
source.uid = init_->uid;
source.api = nullptr; // We use binding v2, no dynamic API.
source.request = {nullptr, nullptr};
- ActionExecOne(&source, init_, nullptr);
+ ActionExecOne(&source, init_, json_object_new_object());
return;
}
else if(api_ == afbBindingV2.api)