# HG changeset patch # User Marco Cirillo # Date 1326225426 0 # Node ID f78a95aa23c4b5d37d41c9a6bbea8650886ef117 # Parent d8614cfe8fc9e62ed15fae0fbd025db6fc05d748 mod_server_status: corrected mistake in the code. diff -r d8614cfe8fc9 -r f78a95aa23c4 mod_server_status/mod_server_status.lua --- a/mod_server_status/mod_server_status.lua Tue Jan 10 19:52:02 2012 +0000 +++ b/mod_server_status/mod_server_status.lua Tue Jan 10 19:57:06 2012 +0000 @@ -96,13 +96,13 @@ if prosody.stanza_counter then result.stanzas = {} ; result.stanzas = prosody.stanza_counter end if show_hosts then result.hosts = {} - for _,n in ipairs(show_hosts) do result.hosts[n] = hosts[name] and "online" or "offline" end + for _,n in ipairs(show_hosts) do result.hosts[n] = hosts[n] and "online" or "offline" end end if show_comps then result.components = {} for _,n in ipairs(show_comps) do - result.components[n] = hosts[name].modules.component and hosts[name].modules.component.connected and "online" or - hosts[name] and hosts[name].modules.component == nil and "online" or "offline" + result.components[n] = hosts[n].modules.component and hosts[n].modules.component.connected and "online" or + hosts[n] and hosts[n].modules.component == nil and "online" or "offline" end end