Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
c4835ee
)
hello3: Add mutebug
37/16237/1
author
Jose Bollo
<jose.bollo@iot.bzh>
Mon, 20 Aug 2018 13:06:56 +0000
(15:06 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Wed, 22 Aug 2018 12:03:52 +0000
(14:03 +0200)
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>
bindings/samples/hello3.c
patch
|
blob
|
history
diff --git
a/bindings/samples/hello3.c
b/bindings/samples/hello3.c
index
99a3582
..
b50ea46
100644
(file)
--- 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}