summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--binding/afm-nfc-binding.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/binding/afm-nfc-binding.c b/binding/afm-nfc-binding.c
index 7d0f6dc..b869a2f 100644
--- a/binding/afm-nfc-binding.c
+++ b/binding/afm-nfc-binding.c
@@ -439,10 +439,10 @@ static void subscribe(afb_req_t request)
const char *ename = afb_event_name(presence_event);
if (!value || !ename)
- return;
+ return afb_req_reply(request, NULL, "invalid", NULL);
if (strcasecmp(value, ename))
- return;
+ return afb_req_reply(request, NULL, "invalid", NULL);
if (afb_req_subscribe(request, presence_event) < 0) {
AFB_REQ_ERROR(request, "subscribe to presence_event failed");
@@ -459,10 +459,10 @@ static void unsubscribe(afb_req_t request)
const char *ename = afb_event_name(presence_event);
if (!value || !ename)
- return;
+ return afb_req_reply(request, NULL, "invalid", NULL);
if (strcasecmp(value, ename))
- return;
+ return afb_req_reply(request, NULL, "invalid", NULL);
if (afb_req_unsubscribe(request, presence_event) < 0) {
AFB_REQ_ERROR(request, "unsubscribe to presence_event failed");