mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-07 20:23:51 +00:00
xml_handler directory.lua is now tolerant when no memcache available, fix a nil variable
This commit is contained in:
@@ -62,15 +62,16 @@
|
||||
--all other directory actions: sip_auth, user_call
|
||||
--except for the action: group_call
|
||||
|
||||
if (user == nil) then
|
||||
user = "";
|
||||
end
|
||||
|
||||
--get the cache
|
||||
if (trim(api:execute("module_exists", "mod_memcache")) == "true") then
|
||||
if (user == nil) then
|
||||
user = "";
|
||||
end
|
||||
if (domain_name) then
|
||||
XML_STRING = trim(api:execute("memcache", "get directory:" .. user .. "@" .. domain_name));
|
||||
end
|
||||
if (XML_STRING == "-ERR NOT FOUND") then
|
||||
if (XML_STRING == "-ERR NOT FOUND") or (XML_STRING == "-ERR CONNECTION FAILURE") then
|
||||
source = "database";
|
||||
continue = true;
|
||||
else
|
||||
@@ -525,4 +526,4 @@
|
||||
--send the xml to the console
|
||||
if (debug["xml_string"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] XML_STRING: \n" .. XML_STRING .. "\n");
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user