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 bb7fe3f2e99548671774b93c4347ead1939a3268..91bddc73dd804e1b0d514f0f548b0b1d326b3138 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 e2a08acf3674f6f210638329e83a211d8cd41a30..8cf35b79b6aea8f0bc75fc02a1e3bf28d85e991d 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