summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/luci-lib-ip/src/ip.c4
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/system.lua8
2 files changed, 4 insertions, 8 deletions
diff --git a/libs/luci-lib-ip/src/ip.c b/libs/luci-lib-ip/src/ip.c
index c799419e53..5bff693f62 100644
--- a/libs/luci-lib-ip/src/ip.c
+++ b/libs/luci-lib-ip/src/ip.c
@@ -1270,7 +1270,9 @@ static int link_get(lua_State *L)
lua_newtable(L);
nl_send_auto_complete(sock, msg);
- nl_recvmsgs(sock, cb);
+
+ while (st.pending > 0)
+ nl_recvmsgs(sock, cb);
nlmsg_free(msg);
nl_cb_put(cb);
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
index 055142b53e..52e347d07b 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
@@ -178,13 +178,7 @@ function action_flashops()
local image_tmp = "/tmp/firmware.img"
local function image_supported()
- -- XXX: yay...
- return ( 0 == os.execute(
- ". /lib/functions.sh; " ..
- "include /lib/upgrade; " ..
- "platform_check_image %q >/dev/null"
- % image_tmp
- ) )
+ return (os.execute("sysupgrade -T %q >/dev/null" % image_tmp) == 0)
end
local function image_checksum()