Software /
code /
prosody
Comparison
core/componentmanager.lua @ 638:1915c64c9436
Changed order of checking for component hosts to check the full and bare JIDs before the hostname
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 24 Dec 2008 05:10:13 +0500 |
parent | 615:4ae3e81513f3 |
child | 673:c9bc58e84e96 |
comparison
equal
deleted
inserted
replaced
631:6957fe7b0313 | 638:1915c64c9436 |
---|---|
29 | 29 |
30 module "componentmanager" | 30 module "componentmanager" |
31 | 31 |
32 function handle_stanza(origin, stanza) | 32 function handle_stanza(origin, stanza) |
33 local node, host = jid_split(stanza.attr.to); | 33 local node, host = jid_split(stanza.attr.to); |
34 local component = components[host]; | 34 local component = nil; |
35 if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource | |
35 if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server | 36 if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server |
36 if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource | 37 if not component then component = components[host]; end |
37 if component then | 38 if component then |
38 log("debug", "stanza being handled by component: "..host); | 39 log("debug", "stanza being handled by component: "..host); |
39 component(origin, stanza, hosts[host]); | 40 component(origin, stanza, hosts[host]); |
40 else | 41 else |
41 log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to); | 42 log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to); |