Software / code / prosody
Comparison
core/stanza_router.lua @ 220:e8edcbce4d46
Fix for checking components, but we need to look at this whole block to optimise it, really we do
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 08 Nov 2008 00:10:01 +0000 |
| parent | 215:ec90acc13ba3 |
| child | 223:d5dffc919b33 |
comparison
equal
deleted
inserted
replaced
| 219:f06e97f525bc | 220:e8edcbce4d46 |
|---|---|
| 79 modules_handle_stanza(origin, stanza); | 79 modules_handle_stanza(origin, stanza); |
| 80 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server | 80 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server |
| 81 component_handle_stanza(origin, stanza); | 81 component_handle_stanza(origin, stanza); |
| 82 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource | 82 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource |
| 83 component_handle_stanza(origin, stanza); | 83 component_handle_stanza(origin, stanza); |
| 84 elseif hosts[host].type == "component" then -- directed at a component | 84 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component |
| 85 component_handle_stanza(origin, stanza); | 85 component_handle_stanza(origin, stanza); |
| 86 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then | 86 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then |
| 87 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare); | 87 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare); |
| 88 elseif stanza.name == "iq" and not resource then -- directed at bare JID | 88 elseif stanza.name == "iq" and not resource then -- directed at bare JID |
| 89 core_handle_stanza(origin, stanza); | 89 core_handle_stanza(origin, stanza); |