aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-07 18:38:22 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-07 18:38:22 +0000
commit673d2cd2a3d49e5aa94589d8a9dbc9555a45f9b7 (patch)
tree0839350236a54dcf826342155e0b0b9509c987e6 /plugins/mod_bosh.lua
parent0bd9d5abf41d797cabe9fa5c374d0e29f97209c3 (diff)
downloadprosody-673d2cd2a3d49e5aa94589d8a9dbc9555a45f9b7.tar.gz
prosody-673d2cd2a3d49e5aa94589d8a9dbc9555a45f9b7.zip
mod_bosh: Switch to util.xmppstream from xmlhandlers
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 2ea8e0a0..d346f247 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -10,7 +10,7 @@ module.host = "*" -- Global module
local hosts = _G.hosts;
local lxp = require "lxp";
-local init_xmlhandlers = require "core.xmlhandlers"
+local new_xmpp_stream = require "util.xmppstream".new;
local httpserver = require "net.httpserver";
local sm = require "core.sessionmanager";
local sm_destroy_session = sm.destroy_session;
@@ -119,9 +119,10 @@ function handle_request(method, body, request)
request.log = log;
request.on_destroy = on_destroy_request;
- local parser = lxp.new(init_xmlhandlers(request, stream_callbacks), "\1");
-
- parser:parse(body);
+ local stream = new_xmpp_stream(request, stream_callbacks);
+ -- stream:feed() calls the stream_callbacks, so all stanzas in
+ -- the body are processed in this next line before it returns.
+ stream:feed(body);
local session = sessions[request.sid];
if session then