mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-01 01:33:49 +00:00
Remove hostname on the acl memcache variable name.
This commit is contained in:
@@ -33,9 +33,8 @@
|
||||
]]
|
||||
|
||||
--get the cache
|
||||
hostname = trim(api:execute("switchname", ""));
|
||||
if (trim(api:execute("module_exists", "mod_memcache")) == "true") then
|
||||
XML_STRING = trim(api:execute("memcache", "get configuration:acl.conf:" .. hostname));
|
||||
XML_STRING = trim(api:execute("memcache", "get configuration:acl.conf"));
|
||||
else
|
||||
XML_STRING = "-ERR NOT FOUND";
|
||||
end
|
||||
@@ -104,18 +103,18 @@
|
||||
dbh:release();
|
||||
|
||||
--set the cache
|
||||
result = trim(api:execute("memcache", "set configuration:acl.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' "..expire["acl.conf"]));
|
||||
result = trim(api:execute("memcache", "set configuration:acl.conf '"..XML_STRING:gsub("'", "'").."' "..expire["acl.conf"]));
|
||||
|
||||
--send the xml to the console
|
||||
--if (debug["xml_string"]) then
|
||||
if (debug["xml_string"]) then
|
||||
local file = assert(io.open(temp_dir .. "/acl.conf.xml", "w"));
|
||||
file:write(XML_STRING);
|
||||
file:close();
|
||||
--end
|
||||
end
|
||||
|
||||
--send to the console
|
||||
if (debug["cache"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] configuration:acl.conf:" .. hostname .." source: database\n");
|
||||
freeswitch.consoleLog("notice", "[xml_handler] configuration:acl.conf source: database\n");
|
||||
end
|
||||
else
|
||||
--replace the ' back to a single quote
|
||||
|
||||
Reference in New Issue
Block a user