Diff

bosh.lua @ 161:b177bcea2006

squishy, verse.client, verse.component, verse.bosh: Port to util.xmppstream instead of xmlhandlers which has been removed from Prosody. Also remove util.ztact from squishy for the same reason.
author Matthew Wild <mwild1@gmail.com>
date Tue, 14 Dec 2010 16:04:29 +0000
parent 93:2442e751f3cb
child 261:c1404c69dec9
line wrap: on
line diff
--- a/bosh.lua	Sun Dec 05 01:06:29 2010 +0000
+++ b/bosh.lua	Tue Dec 14 16:04:29 2010 +0000
@@ -1,5 +1,5 @@
 
-local init_xmlhandlers = require "core.xmlhandlers";
+local new_xmpp_stream = require "util.xmppstream".new;
 local st = require "util.stanza";
 require "net.httpclient_listener"; -- Required for net.http to work
 local http = require "net.http";
@@ -186,8 +186,8 @@
 		return;
 	end
 	local session = { notopen = true, log = self.log };
-	local parser = lxp.new(init_xmlhandlers(session, stream_callbacks), "\1");
-	parser:parse(response);
+	local stream = new_xmpp_stream(session, stream_callbacks);
+	stream:feed(response);
 	return session.payload;
 end