mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Change expire["sofia_conf"] to expire["sofia"] and expire["acl_conf"] to expire["acl"]. Then add a default value to prevent nil errors when the conf.lua script has not been updated.
This commit is contained in:
@@ -42,6 +42,11 @@
|
||||
--set the cache
|
||||
if (XML_STRING == "-ERR NOT FOUND") or (XML_STRING == "-ERR CONNECTION FAILURE") then
|
||||
|
||||
--set a default value
|
||||
if (expire["acl"] == nil) then
|
||||
expire["acl"]= "3600";
|
||||
end
|
||||
|
||||
--connect to the database
|
||||
require "resources.functions.database_handle";
|
||||
dbh = database_handle('system');
|
||||
@@ -103,7 +108,7 @@
|
||||
dbh:release();
|
||||
|
||||
--set the cache
|
||||
result = trim(api:execute("memcache", "set configuration:acl.conf '"..XML_STRING:gsub("'", "'").."' "..expire["acl_conf"]));
|
||||
result = trim(api:execute("memcache", "set configuration:acl.conf '"..XML_STRING:gsub("'", "'").."' "..expire["acl"]));
|
||||
|
||||
--send the xml to the console
|
||||
if (debug["xml_string"]) then
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
--set the cache
|
||||
if (XML_STRING == "-ERR NOT FOUND") or (XML_STRING == "-ERR CONNECTION FAILURE") then
|
||||
|
||||
--set a default value
|
||||
if (expire["sofia"] == nil) then
|
||||
expire["sofia"]= "3600";
|
||||
end
|
||||
|
||||
--connect to the database
|
||||
require "resources.functions.database_handle";
|
||||
dbh = database_handle('system');
|
||||
@@ -258,7 +263,7 @@
|
||||
dbh:release();
|
||||
|
||||
--set the cache
|
||||
result = trim(api:execute("memcache", "set configuration:sofia.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' "..expire["sofia_conf"]));
|
||||
result = trim(api:execute("memcache", "set configuration:sofia.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' "..expire["sofia"]));
|
||||
|
||||
--send the xml to the console
|
||||
if (debug["xml_string"]) then
|
||||
|
||||
Reference in New Issue
Block a user