From ac8beb0cb06e8aef35d9cfa134111e5c6ae09935 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 25 Mar 2013 23:29:15 +0100 Subject: cethcan: json output --- cethcan/can.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cethcan/can.c') diff --git a/cethcan/can.c b/cethcan/can.c index a36fd6c..5145871 100644 --- a/cethcan/can.c +++ b/cethcan/can.c @@ -50,6 +50,14 @@ void can_broadcast(struct can_user *origin, struct can_message *msg) u->handler(u->arg, msg); } +void can_json(json_t *json, enum json_subtype type) +{ + struct can_user *u; + for (u = users; u; u = u->next) + if (u->json) + u->json(u->arg, json, type); +} + void can_init(void) { /* nothing to do */ -- cgit v1.2.1