aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-xreq.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-31 16:58:14 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-03-31 17:13:18 +0200
commita88ecb472d5a82c80b0ccf8f0ef1594ec0d6c878 (patch)
treef30f5a101bb8d43fef4e5578c51336706a1e4405 /src/afb-xreq.c
parent6797f9722dd3e5463e0f7c118397955bb59a40c7 (diff)
Use xreq for websockets
Change-Id: Ia489f863e8be3384fbe8a240f6010f7d5916b72a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-xreq.c')
-rw-r--r--src/afb-xreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-xreq.c b/src/afb-xreq.c
index 5bd2068c..a8849910 100644
--- a/src/afb-xreq.c
+++ b/src/afb-xreq.c
@@ -108,7 +108,7 @@ static void xreq_success_cb(void *closure, struct json_object *obj, const char *
if (xreq->queryitf->success)
xreq->queryitf->success(xreq->query, obj, info);
else
- xreq->queryitf->reply(xreq->query, afb_msg_json_reply_ok(info, obj, &xreq->context, NULL));
+ xreq->queryitf->reply(xreq->query, 0, afb_msg_json_reply_ok(info, obj, &xreq->context, NULL));
}
}
@@ -122,7 +122,7 @@ static void xreq_fail_cb(void *closure, const char *status, const char *info)
if (xreq->queryitf->fail)
xreq->queryitf->fail(xreq->query, status, info);
else
- xreq->queryitf->reply(xreq->query, afb_msg_json_reply_error(status, info, &xreq->context, NULL));
+ xreq->queryitf->reply(xreq->query, 1, afb_msg_json_reply_error(status, info, &xreq->context, NULL));
}
}