From: Jose Bollo Date: Mon, 20 Aug 2018 13:06:56 +0000 (+0200) Subject: hello3: Add mutebug X-Git-Tag: flounder_5.99.4~10 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=commitdiff_plain;h=9893640014f28ef9ad844939405f84b75a7fb57e 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 --- 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}