#574 additional fixes and log cleanup

This commit is contained in:
Mikayla Fischler 2024-12-20 12:44:39 -05:00
parent e8b8dfde5b
commit c4c45ae329
2 changed files with 15 additions and 13 deletions

View File

@ -428,7 +428,7 @@ local function main()
if not formed then if not formed then
if formed == false then if formed == false then
log.info(util.c("sys_config> device '", name, "' is not formed")) log.info(util.c("sys_config> device '", name, "' is not formed"))
end else formed = false end
elseif faulted then elseif faulted then
-- sometimes there is a race condition on server boot where it reports formed, but -- sometimes there is a race condition on server boot where it reports formed, but
-- the other functions are not yet defined (that's the theory at least). mark as unformed to attempt connection later -- the other functions are not yet defined (that's the theory at least). mark as unformed to attempt connection later
@ -458,7 +458,7 @@ local function main()
table.insert(units, rtu_unit) table.insert(units, rtu_unit)
local for_message = "facility" local for_message = "the facility"
if for_reactor > 0 then if for_reactor > 0 then
for_message = util.c("reactor ", for_reactor) for_message = util.c("reactor ", for_reactor)
end end

View File

@ -486,7 +486,9 @@ function threads.thread__unit_comms(smem, unit)
local last_f_check = 0 local last_f_check = 0
local detail_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ") [", unit.index, "] for reactor ", unit.reactor) local detail_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ") ",
util.trinary(unit.index == false, "", util.c("[", unit.index, "] ")), "for ",
util.trinary(unit.reactor == 0, "the facility", util.c("reactor ", unit.reactor)))
local short_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ")") local short_name = util.c(types.rtu_type_to_string(unit.type), " (", unit.name, ")")
if packet_queue == nil then if packet_queue == nil then