aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal-composer-binding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal-composer-binding.cpp')
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index cc3b9a8..1e14aad 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -186,12 +186,13 @@ void get(struct afb_req request)
return;
}
- ans = Composer::instance().getSignalValue(sig, options);
+ ans = Composer::instance().getsignalValue(sig, options);
- if (ans)
+ if (json_object_array_length(ans))
afb_req_success(request, ans, NULL);
else
- afb_req_fail(request, "error", NULL);
+ afb_req_fail(request, "error", "No signals found.");
+
}
int loadConf()