aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal-composer-binding.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-28 20:07:54 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit784d48b8f432119de570a119a760e05e9068d12d (patch)
tree945486d89e10b67febde3522b723443e70b9e6e6 /signal-composer-binding/signal-composer-binding.cpp
parent7b5a679d0ae117eb6b5bbcf516bf9e5051afd7dd (diff)
Enhance list/get verb
Handle options in a vector. Change-Id: Iafad2d93ea027db054750816750f4d07bd13c5d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal-composer-binding.cpp')
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index 36d0c9d..a1e4543 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -158,13 +158,9 @@ void list(afb_req request)
{json_object_array_add(allSignalsJ, sig->toJSON());}
if(json_object_array_length(allSignalsJ) && !execConf())
- {
- afb_req_success(request, allSignalsJ, NULL);
- }
+ {afb_req_success(request, allSignalsJ, NULL);}
else
- {
- afb_req_fail(request, "error", "No Signals recorded so far");
- }
+ {afb_req_fail(request, "error", "No Signals recorded so far");}
}
/// @brief entry point for get requests.
@@ -176,7 +172,7 @@ void get(struct afb_req request)
const char* sig;
// Process about Raw CAN message on CAN bus directly
- err = wrap_json_unpack(args, "{ss,s?o!}", "signals", &sig,
+ err = wrap_json_unpack(args, "{ss,s?o!}", "signal", &sig,
"options", &options);
if(err)
{