summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal-composer.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-30 19:50:08 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:26 +0100
commite0ab61dd6e713300da91120d24db2434a9e69b3e (patch)
tree854e338700a8f635f5171a823f418e1b602554e5 /signal-composer-binding/signal-composer.cpp
parent9126bfd1677ca525b8c3a572380f9880fdfed5bb (diff)
Don't stop parsing signal even if one malformation
Change-Id: I266dd03cde2c712ab1b2e713f0c57a89063f72e4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal-composer.cpp')
-rw-r--r--signal-composer-binding/signal-composer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp
index ce310a8..572a6c4 100644
--- a/signal-composer-binding/signal-composer.cpp
+++ b/signal-composer-binding/signal-composer.cpp
@@ -376,14 +376,14 @@ int Composer::loadOneSignal(json_object* signalJ)
"onReceived", &onReceivedJ);
if (err)
{
- AFB_ERROR("Missing something id|[event|depends]|[getSignalsArgs]|[retention]|[unit]|[frequency]|[onReceived] in %s", json_object_get_string(signalJ));
+ AFB_ERROR("Missing something uid|[event|depends]|[getSignalsArgs]|[retention]|[unit]|[frequency]|[onReceived] in %s", json_object_get_string(signalJ));
return err;
}
// event or depends field manadatory
if( (!event && !dependsJ) || (event && dependsJ) )
{
- AFB_ERROR("Missing something id|[event|depends]|[getSignalsArgs]|[retention]|[unit]|[frequency]|[onReceived] in %s. Or you declare event AND depends, only one of them is needed.", json_object_get_string(signalJ));
+ AFB_ERROR("Missing something uid|[event|depends]|[getSignalsArgs]|[retention]|[unit]|[frequency]|[onReceived] in %s. Or you declare event AND depends, only one of them is needed.", json_object_get_string(signalJ));
return -1;
}
@@ -478,8 +478,7 @@ int Composer::loadSignals(AFB_ApiT apihandle, CtlSectionT* section, json_object
for (int idx = 0; idx < count; idx++)
{
json_object *signalJ = json_object_array_get_idx(signalsJ, idx);
- err = composer.loadOneSignal(signalJ);
- if (err) return err;
+ err += composer.loadOneSignal(signalJ);
}
}
else