From 61883f2c3fdad559dd1362ca76c258793cd32c82 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 26 Jun 2012 21:49:24 +0000 Subject: [PATCH] libs/core: fix network is_empty() check for wifi-ifaces which are part of multiple networks --- libs/core/luasrc/model/network.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua index d06216433..1764a3d41 100644 --- a/libs/core/luasrc/model/network.lua +++ b/libs/core/luasrc/model/network.lua @@ -782,9 +782,12 @@ function protocol.is_empty(self) _uci_real:foreach("wireless", "wifi-iface", function(s) - if s.network == self.sid then - rv = false - return false + local n + for n in utl.imatch(s.network) do + if n == self.sid then + rv = false + return false + end end end) -- 2.25.1