- use less memory
- decrease lookup time
- make read only variables const
- remove unused variables / macros
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
- use libubus instead of fork and exec ubus program
- move redundant code to static functions
- don't export ubus_ctx. It's only used in dmubus.c
- mark static gobals static
- remove unecessary json to blobmsg conversions/allocations when preparing parameters for ubus_invoke
- fix memleaks on not freeing ubus_ctx from ubus_connect
- fix invoking requests on random stack value id when ubus_lookup_id failed
- don't connect/disconnect on every request
- don't reallocate blob_buf on every request
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>