Merge pull request #4373 from wjowsa/ubus-connect-args
luci-base: Add possiblity to set path and timeout of ubus connection
This commit is contained in:
commit
bd40525a69
1 changed files with 2 additions and 2 deletions
|
@ -663,9 +663,9 @@ local function ubus_return(...)
|
|||
return ...
|
||||
end
|
||||
|
||||
function ubus(object, method, data)
|
||||
function ubus(object, method, data, path, timeout)
|
||||
if not _ubus_connection then
|
||||
_ubus_connection = _ubus.connect()
|
||||
_ubus_connection = _ubus.connect(path, timeout)
|
||||
assert(_ubus_connection, "Unable to establish ubus connection")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue