aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/samples
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-08-20 15:06:56 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-08-22 14:03:52 +0200
commit9893640014f28ef9ad844939405f84b75a7fb57e (patch)
tree7f8f4b6de2ca864081670e97373014d1e61c64dd /bindings/samples
parentc4835ee2a1b46069e5addf6f8b023c2e66e3665b (diff)
hello3: Add mutebug
The verb mutebug returns without answering but increment the reference count of the request. This has 2 weird effects: - on the service, it creates a memory leak - on the client, it creates a starve of answer Both effects are intended to test further improvements of the binder. Change-Id: I76ebe0dff1b42a8a72e1b3536857d1d1811452c1 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'bindings/samples')
-rw-r--r--bindings/samples/hello3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bindings/samples/hello3.c b/bindings/samples/hello3.c
index 99a35829..b50ea46d 100644
--- a/bindings/samples/hello3.c
+++ b/bindings/samples/hello3.c
@@ -539,6 +539,11 @@ static void mute(afb_req_t request)
{
}
+static void mutebug(afb_req_t request)
+{
+ afb_req_addref(request);
+}
+
void queue_cb(int signum, void *arg)
{
afb_req_t request = arg;
@@ -741,6 +746,7 @@ static const struct afb_verb_v3 verbs[]= {
{ .verb="locale", .callback=locale},
{ .verb="api", .callback=api},
{ .verb="mute", .callback=mute},
+ { .verb="mutebug", .callback=mutebug},
{ .verb="queue", .callback=queue},
{ .verb="settings", .callback=settings},
{ .verb=NULL}