summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorZach LeBar <zach@zachlebar.com>2012-06-30 20:49:50 +0000
committerZach LeBar <zach@zachlebar.com>2012-06-30 20:49:50 +0000
commitf5a8c4b60d15244ab2b0dd237430a595e9174c90 (patch)
tree049d0b185d09906911e2b65e906c6c57d7c9e0dd /config
parente397a257ba8ad7721195c04242cf41d01a787cb2 (diff)
downloadacf-provisioning-f5a8c4b60d15244ab2b0dd237430a595e9174c90.tar.bz2
acf-provisioning-f5a8c4b60d15244ab2b0dd237430a595e9174c90.tar.xz
Further changes to process_put.lua: more flexible regex and better handling of default ringtone parameter.
Diffstat (limited to 'config')
-rw-r--r--config/process_put.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/process_put.lua b/config/process_put.lua
index 662b038..569ecf0 100644
--- a/config/process_put.lua
+++ b/config/process_put.lua
@@ -10,7 +10,7 @@ function process_polycom()
local before, xml, after = string.match(data, "(.*<OVERRIDES)([^/]*)(/>.*)")
if not xml then return end
local attrs = {}
- for str in string.gmatch(xml, "%S+\".+\"") do
+ for str in string.gmatch(xml, "%S+") do
local n,v = string.match(str, "([^=]+)=\"(.*)\"")
if not attrs[n] then
attrs[n] = v
@@ -27,7 +27,6 @@ function process_polycom()
-- search attribute name for reg_name like "reg.1."
-- and for rest like "fwdStatus"
local num, rest = string.match(n, "reg%.(%d+)%.([%.%a]*)$")
-
-- this parameter controls the default ringtone
if n == "np.normal.ringing.calls.tonePattern" then
for a,b in pairs(params.value) do
@@ -57,7 +56,7 @@ function process_polycom()
end
end
- data = before.."\n"..table.concat(xmlout, " ").."\n"..after
+ data = before.." "..table.concat(xmlout, " ").." "..after
end
-- Determine the template