Comparison

core/componentmanager.lua @ 970:5516f9e66482

sessionmanager, componentmanager: Fix some wacky indentation (thanks greyback!)
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Apr 2009 23:20:22 +0100
parent 961:b48ed2149d0a
child 982:dbbeb73952e6
comparison
equal deleted inserted replaced
965:8bc06338aac3 970:5516f9e66482
71 log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to); 71 log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to);
72 end 72 end
73 end 73 end
74 74
75 function create_component(host, component) 75 function create_component(host, component)
76 -- TODO check for host well-formedness 76 -- TODO check for host well-formedness
77 local session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component }; 77 local session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component };
78 return session; 78 return session;
79 end 79 end
80 80
81 function register_component(host, component, session) 81 function register_component(host, component, session)
82 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then 82 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then
83 components[host] = component; 83 components[host] = component;