Software /
code /
prosody
Comparison
core/stanza_router.lua @ 68:ceb7a55676a4
Beginnings of real stanza routing
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 19:48:25 +0100 |
parent | 66:018705d57f09 |
child | 71:fbb4ef1da82e |
comparison
equal
deleted
inserted
replaced
67:563360207292 | 68:ceb7a55676a4 |
---|---|
39 end | 39 end |
40 end | 40 end |
41 | 41 |
42 function core_route_stanza(origin, stanza) | 42 function core_route_stanza(origin, stanza) |
43 -- Hooks | 43 -- Hooks |
44 --- ...later | |
45 | |
44 -- Deliver | 46 -- Deliver |
47 local node, host, resource = jid_split(stanza.attr.to); | |
48 local host_session = hosts[host] | |
49 if host_session and host_session.type == "local" then | |
50 -- Local host | |
51 else | |
52 -- Remote host | |
53 if host_session then | |
54 -- Send to session | |
55 else | |
56 -- Need to establish the connection | |
57 end | |
58 end | |
45 end | 59 end |
46 | 60 |
47 function handle_stanza_nodest(stanza) | 61 function handle_stanza_nodest(stanza) |
48 if stanza.name == "iq" then | 62 if stanza.name == "iq" then |
49 handle_stanza_iq_no_to(session, stanza); | 63 handle_stanza_iq_no_to(session, stanza); |