database_host nil prevention

This commit is contained in:
luis daniel lucio quiroz
2013-12-23 00:39:02 +00:00
parent a85673b66f
commit fbc34dfab8

View File

@@ -137,11 +137,12 @@
database_hostname = row["hostname"];
end);
--freeswitch.consoleLog("notice", "[xml_handler] sql: " .. sql .. "\n");
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] database_hostname is " .. database_hostname .. "\n");
--hostname was not found set load_balancing to false to prevent a database_hostname concatenation error
if (database_hostname == nil) then
load_balancing = false;
else
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] database_hostname is " .. database_hostname .. "\n");
end
--close the database connection