Comparison

core/componentmanager.lua @ 945:699f0c46526a

core.componentmanager: Fix global set, causing problems with multiple components. Fixes #82.
author Matthew Wild <mwild1@gmail.com>
date Tue, 31 Mar 2009 03:48:51 +0100
parent 939:b832f786af62
child 961:b48ed2149d0a
comparison
equal deleted inserted replaced
944:2335ece4942d 945:699f0c46526a
66 end 66 end
67 end 67 end
68 68
69 function create_component(host, component) 69 function create_component(host, component)
70 -- TODO check for host well-formedness 70 -- TODO check for host well-formedness
71 session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component }; 71 local session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component };
72 return session; 72 return session;
73 end 73 end
74 74
75 function register_component(host, component, session) 75 function register_component(host, component, session)
76 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then 76 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then