summaryrefslogtreecommitdiff
path: root/ubusd_obj.c
Commit message (Collapse)AuthorAgeFilesLines
* workaround possibly false positive uses of memory after it is freedPetr Štetiar2019-12-191-3/+2
| | | | | | | | | | | | | | | | | | scan-build from clang-9 has reported following: libubox/list.h:83:22: warning: Use of memory after it is freed entry->next->prev = entry->prev; ^~~~~~~~~~~ ubusd_event.c:42:3: warning: Use of memory after it is freed ubusd_delete_event_source(ev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Which might be a false positives, but in order to make the code pass the static analyzer checks, rewrite the while loops on lists with the safe list iterator. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* iron out all extra compiler warningsPetr Štetiar2019-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | clang-9 on x86/64 has reported following warnings/errors: libubus-acl.c:123:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] libubus-io.c:108:18: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] libubus-io.c:395:56: error: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] libubus-req.c:441:4: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:119:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd_acl.c:152:5: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:348:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:352:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:357:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:362:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:367:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] ubusd_acl.c:447:16: error: comparison of integers of different signs: 'int' and '__size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] ubusd_acl.c:502:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd.c:123:13: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd.c:170:15: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd.c:262:43: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd.c:287:30: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd_event.c:170:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] ubusd_obj.c:71:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ubusd: add monitor supportFelix Fietkau2015-11-191-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* hook acl into ubusdJohn Crispin2015-06-181-0/+4
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* ubus: Fix issues reported by static code analysis tool KlocworkHans Dedecker2015-04-201-0/+3
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* libubus: replace __init with __constructorZefir Kurtisi2014-09-171-1/+1
| | | | | | | | __init has a naming collision with C++ and prevents ubus_common.h from being included. Instead, use __constructor as defined from libubox. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
* remove the "method" argument for object subscriptionFelix Fietkau2012-12-141-3/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* ubus: add notification for subscribers present/goneFelix Fietkau2012-12-141-0/+9
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* watch add/remove -> subscribe/unsubscribe:Felix Fietkau2012-12-131-20/+20
| | | | | | | rename the ADD_WATCH/REMOVE_WATCH messages to SUBSCRIBE/UNSUBSCRIBE and change the message format and libubus API in preparation for adding object notifications Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* ubusd: add support for watching objects to get notified when they go awayFelix Fietkau2012-05-191-0/+33
|
* ubusd: allow registration of anonymous objects with typeFelix Fietkau2012-05-191-3/+0
|
* add copyright/license informationFelix Fietkau2011-06-171-0/+13
|
* add support for a const void * key in avlFelix Fietkau2011-04-131-2/+2
|
* do not reverse method sorting orderFelix Fietkau2011-03-271-1/+1
|
* add notifications for registered/unregistered objects with pathFelix Fietkau2011-02-101-0/+2
|
* follow blob_get_int* -> blob_get_u* renameFelix Fietkau2011-02-061-1/+1
|
* fix event handler list initializationFelix Fietkau2011-02-061-1/+1
|
* add functionality for registering anonymous objects as event listenersFelix Fietkau2011-02-051-2/+6
|
* add some stub functionality for the ubus event switchFelix Fietkau2011-02-051-8/+6
|
* add functions for internal object allocationFelix Fietkau2011-02-051-15/+40
|
* remove path based invoke functions, add stub implementation for invoking ↵Felix Fietkau2011-01-311-0/+1
| | | | method calls
* Initial importFelix Fietkau2011-01-301-0/+147