ocserv: modified match to apply to newer versions of occtl 299/head
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 18 Jan 2015 21:46:01 +0000 (22:46 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 18 Jan 2015 21:49:06 +0000 (22:49 +0100)
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 bb7fe3f..91bddc7 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 = 
-                               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,
index e2a08ac..8cf35b7 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 = 
-                       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