-- do not set name, address, id
_M.servers = {}
+-- Whether or not we should log everything we do
+_M.verbose = false
+
-- these are the servers we have
-- key = name
-- value = {address, serverObject} (should make these named members)
local existing = ourservers[name]
if existing ~= nil
then
+ if _M.verbose then
+ infolog(string.format("existing[1] [%s] == ip [%s] ??", existing[1], ip))
+ end
-- it exists, check IP
- infolog(string.format("existing[1] [%s] == ip [%s] ??", existing[1], ip))
if existing[1] == ip
then
-- IP is correct, done!
for name, ips in pairs(resout)
do
- infolog("name="..name)
- for _, ip in ipairs(ips)
- do
- infolog(" ip="..ip)
+ if _M.verbose then
+ infolog("name="..name)
+ for _, ip in ipairs(ips)
+ do
+ infolog(" ip="..ip)
+ end
end
if #ips == 0