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:
c623236
)
afb-evt: unprefix event name
author
José Bollo
<jose.bollo@iot.bzh>
Mon, 31 Jul 2017 14:25:06 +0000
(16:25 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Mon, 31 Jul 2017 14:25:06 +0000
(16:25 +0200)
Removes the api prefix of the event name.
Change-Id: I050dc86beb08659751c1e57b8d3ea233bac9e411
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-evt.c
patch
|
blob
|
history
diff --git
a/src/afb-evt.c
b/src/afb-evt.c
index
d80af04
..
20ef5e9
100644
(file)
--- a/
src/afb-evt.c
+++ b/
src/afb-evt.c
@@
-213,9
+213,11
@@
static int evt_push(struct afb_evt_event *evt, struct json_object *obj)
*/
static const char *evt_name(struct afb_evt_event *evt)
{
+ const char *name = strchr(evt->name, '/');
+ name = name ? name + 1 : evt->name;
if (evt->hookflags & afb_hook_flag_evt_name)
afb_hook_evt_name(evt->name, evt->id);
- return
evt->
name;
+ return name;
}
/*