aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-10-05 19:48:25 +0100
committerMatthew Wild <mwild1@gmail.com>2008-10-05 19:48:25 +0100
commit63de1444c34fe6f496046909d2a85d114a148c75 (patch)
treec2c79017932cee680ea1397b868ab27b2ea106cf
parent3b33f156543f9d521885afd84d479052b4debcc0 (diff)
downloadprosody-63de1444c34fe6f496046909d2a85d114a148c75.tar.gz
prosody-63de1444c34fe6f496046909d2a85d114a148c75.zip
Beginnings of real stanza routing
-rw-r--r--core/stanza_router.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 489bb96d..10335fa3 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -41,7 +41,21 @@ end
function core_route_stanza(origin, stanza)
-- Hooks
+ --- ...later
+
-- Deliver
+ local node, host, resource = jid_split(stanza.attr.to);
+ local host_session = hosts[host]
+ if host_session and host_session.type == "local" then
+ -- Local host
+ else
+ -- Remote host
+ if host_session then
+ -- Send to session
+ else
+ -- Need to establish the connection
+ end
+ end
end
function handle_stanza_nodest(stanza)