Remove hostname on the acl memcache variable name.

This commit is contained in:
markjcrane
2015-08-13 19:49:09 -06:00
parent 9f11b01810
commit a666d65be7
@@ -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 &#39 back to a single quote --replace the &#39 back to a single quote