summaryrefslogtreecommitdiff
path: root/ubusd_event.c
Commit message (Collapse)AuthorAgeFilesLines
* ubusd_acl: event send access list supportHans Dedecker2018-10-061-0/+3
| | | | | | | | | | | | | Adds event send access list support in ubus via the "send" keyword Example of a json file: { "user": "superuser", "send": [ "wireless.*" ], } Signed-off-by: Koen Dergent <koen.cj.dergent@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubusd_acl: event listen access list supportHans Dedecker2018-10-061-0/+3
| | | | | | | | | | | | | | Adds event listen access list support in ubus via the "listen" keyword Example of a json file: { "user": "superuser", "listen": [ "network.*" ], } Signed-off-by: Koen Dergent <koen.cj.dergent@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubusd_event: move strmatch_len to ubus_common.hHans Dedecker2018-10-061-10/+1
| | | | | | Rename strmatch_len into ubus_strmatch_len and move it to ubus_common.h Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubusd: don't free messages in ubus_send_msg() anymoreAlexandru Ardelean2017-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes it clear that `ubus_msg_send()` is only about sending and queue-ing messages, and has nothing to do with free-ing. It can be a bit misleading/confusing when trying to go through the code and make assumptions about whether a buffer is free'd in ubus_send_msg(), or is free'd outside. In `ubusd_proto_receive_message()` the `ubus_msg_free()` is now called before the `if (ret == -1)` check. That way, all callbacks will have their messages free'd, which is what's desired, but confusing, because: * ubusd_handle_invoke() called ubus_msg_free() before returning -1 * ubusd_handle_notify() called ubus_msg_free() before returning -1 * ubusd_handle_response() called ubus_msg_send(,,free=true) before returning -1 * ubus_msg_send() would call ubus_msg_send(,,free=false) * all other callback callers would `ubus_msg_send(,,free=true)` (free the buffers in ubus_msg_send() ) In all other places, where `ubus_msg_send(,,free=true)` an explicit `ubus_msg_free()` was added. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* make ubusd_send_event() none staticJohn Crispin2015-06-181-4/+2
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* pass ubus_msg_buf to callback of internal objectJohn Crispin2015-06-181-1/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* ubus: Fix issues reported by static code analysis tool KlocworkHans Dedecker2015-04-201-1/+2
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* make a few functions staticFelix Fietkau2012-05-291-1/+1
|
* add copyright/license informationFelix Fietkau2011-06-171-0/+13
|
* add support for a const void * key in avlFelix Fietkau2011-04-131-3/+4
|
* remove separate catch all list, always require a pattern argument for ↵Felix Fietkau2011-02-111-61/+17
| | | | registering events, even if it is just *
* fix initial object event sequence numberFelix Fietkau2011-02-101-1/+1
|
* add notifications for registered/unregistered objects with pathFelix Fietkau2011-02-101-0/+24
|
* move event message formatting into a callbackFelix Fietkau2011-02-101-16/+27
|
* split event sending from event forwardingFelix Fietkau2011-02-101-24/+33
|
* add missing includeFelix Fietkau2011-02-071-0/+1
|
* implement event pattern matchingFelix Fietkau2011-02-071-7/+56
|
* trim the wildcard of partial patterns to keep the avl tree sorted properlyFelix Fietkau2011-02-071-2/+14
|
* remove old data structuresFelix Fietkau2011-02-071-12/+0
|
* add code for sending events and fix the code for receiving eventsFelix Fietkau2011-02-071-12/+76
|
* add functionality for registering anonymous objects as event listenersFelix Fietkau2011-02-051-14/+113
|
* add some stub functionality for the ubus event switchFelix Fietkau2011-02-051-0/+45