Merge pull request #299 from nmav/ocserv-match
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 19 Jan 2015 17:39:10 +0000 (18:39 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 19 Jan 2015 17:39:10 +0000 (18:39 +0100)
luci-app-ocserv: modified match to apply to newer versions of occtl

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