luci-app-ocserv: list users with no group 393/head
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 May 2015 14:40:51 +0000 (16:40 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 May 2015 14:52:32 +0000 (16:52 +0200)
This was marked as "(none)" which was not caught by the regex.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
applications/luci-app-ocserv/luasrc/controller/ocserv.lua
applications/luci-app-ocserv/luasrc/model/cbi/ocserv/users.lua

index 91bddc7..dbeaaf8 100644 (file)
@@ -44,7 +44,7 @@ function ocserv_status()
                        if not ln then break end
                
                        local id, user, group, vpn_ip, ip, device, time, cipher, status = 
                        if not ln then break end
                
                        local id, user, group, vpn_ip, ip, device, time, cipher, status = 
-                               ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*")
+                               ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%(%)%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*")
                        if id then
                                fwd[#fwd+1] = {
                                        id = id,
                        if id then
                                fwd[#fwd+1] = {
                                        id = id,
index c4be181..0fa997c 100644 (file)
@@ -47,7 +47,7 @@ if fd then local ln
                if not ln then break end
 
                local id, user, group, vpn_ip, ip, device, time, cipher, status = 
                if not ln then break end
 
                local id, user, group, vpn_ip, ip, device, time, cipher, status = 
-                       ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*")
+                       ln:match("^%s*(%d+)%s+([-_%w]+)%s+([%(%)%.%*-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%:%.-_%w]+)%s+([%(%)%:%.-_%w]+)%s+([%:%.-_%w]+).*")
                if id then
                        table.insert(lusers, {id, user, group, vpn_ip, ip, device, time, cipher, status})
                end
                if id then
                        table.insert(lusers, {id, user, group, vpn_ip, ip, device, time, cipher, status})
                end