diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-02-23 05:07:33 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-02-24 21:16:07 +0000 |
commit | bcd0a7c5a6f5d84924563ccd2a7eb4eb18a8dbbe (patch) | |
tree | 6c6d8c7307d48d48990be7691905af273d3a5652 | |
parent | 773d2727c6a7d0814575d5827d4c1221cf4e261a (diff) | |
download | acf-provisioning-bcd0a7c5a6f5d84924563ccd2a7eb4eb18a8dbbe.tar.bz2 acf-provisioning-bcd0a7c5a6f5d84924563ccd2a7eb4eb18a8dbbe.tar.xz |
Fix process_put pattern matching to allow for spaces in values
(cherry picked from commit 7b02f9584246caf458e1e02b851b4bca052d18f2)
-rw-r--r-- | config/process_put.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/process_put.lua b/config/process_put.lua index e203cf0..0194e46 100644 --- a/config/process_put.lua +++ b/config/process_put.lua @@ -27,10 +27,10 @@ end local params = functions.get_device_params(device_id) function process_polycom() - local before, xml, after = string.match(data, "(.*<OVERRIDES)([^/]*)(/>.*)") + 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 |