Changeset

544:f78a95aa23c4

mod_server_status: corrected mistake in the code.
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 10 Jan 2012 19:57:06 +0000
parents 543:d8614cfe8fc9
children 545:77f350635f4f
files mod_server_status/mod_server_status.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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