summaryrefslogtreecommitdiff
path: root/handler.c
Commit message (Collapse)AuthorAgeFilesLines
* handler: add mechanism to generate external device handler stubsArne Kappen2021-03-311-0/+114
| | | | | | | | | | | | | | | Parse JSON files in a given directory and pass the information on to a callback function for creation of an external device handler stub. The description contains: - 'name': the name of the device type, - 'ubus_name': the name of the external device handler daemon on ubus, - 'bridge': a flag indicating whether the devices are bridge-like, - optionally 'br_prefix': a prefix for created devices (only for bridge-like, defaults to type name), - 'config': the UCI config options for devices of this type, and - optionally 'info' and 'stats': the format of calls to info() and dump(). Signed-off-by: Arne Kappen <arne.kappen@hhi.fraunhofer.de>
* handler: fix resource leak on error in netifd_init_script_handlers()Hans Dedecker2018-04-121-1/+6
| | | | | | Detected by Coverity in CID 1412486 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* handler: replace is_error() helper with NULL checkAlexandru Ardelean2017-12-101-1/+1
| | | | | | | | | | The `is_error()` is just a macro that checks that object is NULL (which is considered an error in libjson-c terminology). Newer libjson-c versions have deprecated this. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* handler: Fix memory leakHans Dedecker2016-02-011-1/+5
| | | | | | Call globfree to free dynamically allocated storage from a previous glob call Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* make netifd_handler_parse_config honour the luci validation passed from the ↵John Crispin2014-02-171-0/+16
| | | | | | backend scripts Signed-off-by: John Crispin <blogic@openwrt.org>
* Work around warn_unused_result in recent gcc/libcSteven Barth2014-02-161-2/+2
|
* utils: add a function for checking if a process given by pid is still aliveFelix Fietkau2013-10-221-1/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* proto-shell: move more core to handler.cFelix Fietkau2013-10-221-3/+20
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* proto-shell: move script handler config parse code to handler.cFelix Fietkau2013-10-221-0/+57
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* proto-shell: move script handler dump code to handler.cFelix Fietkau2013-10-221-0/+119
Signed-off-by: Felix Fietkau <nbd@openwrt.org>