Comparison

core/componentmanager.lua @ 1990:b7fff80908b6

componentmanager: Let the default component handler handle stanzas if a component handler isn't available.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 18 Oct 2009 01:52:37 +0500
parent 1970:edab0c61fc02
child 1991:ed4cd15bf4dd
comparison
equal deleted inserted replaced
1989:97c3236cc4ac 1990:b7fff80908b6
65 if component then 65 if component then
66 log("debug", "%s stanza being handled by component: %s", stanza.name, host); 66 log("debug", "%s stanza being handled by component: %s", stanza.name, host);
67 component(origin, stanza, hosts[host]); 67 component(origin, stanza, hosts[host]);
68 else 68 else
69 log("error", "Component manager recieved a stanza for a non-existing component: "..tostring(stanza)); 69 log("error", "Component manager recieved a stanza for a non-existing component: "..tostring(stanza));
70 default_component_handler(origin, stanza);
70 end 71 end
71 end 72 end
72 73
73 function create_component(host, component, events) 74 function create_component(host, component, events)
74 -- TODO check for host well-formedness 75 -- TODO check for host well-formedness