From 6c63383f0d658e6ce2bf2ead75db31166c878988 Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Sun, 9 Dec 2018 20:55:05 +0100 Subject: [PATCH] luci-app-bmx6: Avoid race condition in bmx6json.lua get() The network topology of a BMX6 mesh can be obtained by asking all the nodes about their links via the bmx6-info script. The wget() function in the bmx6json.lua file is part of the process, but it often returns nil, even if the remote data can actually be fetched, in what seems to be a race condition. By calling the sys.exec("") function empty, the race condition disappears. Dirty fix to https://github.com/openwrt-routing/packages/issues/436. Signed-off-by: Roger Pueyo Centelles --- luci-app-bmx6/bmx6/usr/lib/lua/luci/model/bmx6json.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/luci-app-bmx6/bmx6/usr/lib/lua/luci/model/bmx6json.lua b/luci-app-bmx6/bmx6/usr/lib/lua/luci/model/bmx6json.lua index a4a8e43..a61362b 100644 --- a/luci-app-bmx6/bmx6/usr/lib/lua/luci/model/bmx6json.lua +++ b/luci-app-bmx6/bmx6/usr/lib/lua/luci/model/bmx6json.lua @@ -59,6 +59,7 @@ function get(field, host) if json_url[1] == "http" then raw,err = wget(url..field,1000) + sys.exec("") else if json_url[1] == "exec" then -- 2.30.2