Remove hostname on the acl memcache variable name.
This commit is contained in:
+5
-6
@@ -33,9 +33,8 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
--get the cache
|
--get the cache
|
||||||
hostname = trim(api:execute("switchname", ""));
|
|
||||||
if (trim(api:execute("module_exists", "mod_memcache")) == "true") then
|
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
|
else
|
||||||
XML_STRING = "-ERR NOT FOUND";
|
XML_STRING = "-ERR NOT FOUND";
|
||||||
end
|
end
|
||||||
@@ -104,18 +103,18 @@
|
|||||||
dbh:release();
|
dbh:release();
|
||||||
|
|
||||||
--set the cache
|
--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
|
--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"));
|
local file = assert(io.open(temp_dir .. "/acl.conf.xml", "w"));
|
||||||
file:write(XML_STRING);
|
file:write(XML_STRING);
|
||||||
file:close();
|
file:close();
|
||||||
--end
|
end
|
||||||
|
|
||||||
--send to the console
|
--send to the console
|
||||||
if (debug["cache"]) then
|
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
|
end
|
||||||
else
|
else
|
||||||
--replace the ' back to a single quote
|
--replace the ' back to a single quote
|
||||||
|
|||||||
Reference in New Issue
Block a user