Software /
code /
verse
Comparison
client.lua @ 21:00da62000b83
verse.client: Fixes for new xmlhandlers namespace seperator
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 01 Dec 2009 04:16:11 +0000 |
parent | 13:c3d83b98fb4f |
child | 22:e6fad7c411fe |
comparison
equal
deleted
inserted
replaced
20:972066e06f4c | 21:00da62000b83 |
---|---|
6 local st = require "util.stanza"; | 6 local st = require "util.stanza"; |
7 local init_xmlhandlers = require "xmlhandlers"; | 7 local init_xmlhandlers = require "xmlhandlers"; |
8 | 8 |
9 local xmlns_stream = "http://etherx.jabber.org/streams"; | 9 local xmlns_stream = "http://etherx.jabber.org/streams"; |
10 | 10 |
11 local stream_callbacks = { stream_tag = xmlns_stream.."|stream", | 11 local stream_callbacks = { stream_tag = xmlns_stream.."\1stream", |
12 default_ns = "jabber:client" }; | 12 default_ns = "jabber:client" }; |
13 | 13 |
14 function stream_callbacks.streamopened(stream, attr) | 14 function stream_callbacks.streamopened(stream, attr) |
15 if not stream:event("opened") then | 15 if not stream:event("opened") then |
16 stream.notopen = nil; | 16 stream.notopen = nil; |
31 return stream:event("stanza", stanza); | 31 return stream:event("stanza", stanza); |
32 end | 32 end |
33 | 33 |
34 local function reset_stream(stream) | 34 local function reset_stream(stream) |
35 -- Reset stream | 35 -- Reset stream |
36 local parser = lxp.new(init_xmlhandlers(stream, stream_callbacks), "|"); | 36 local parser = lxp.new(init_xmlhandlers(stream, stream_callbacks), "\1"); |
37 stream.parser = parser; | 37 stream.parser = parser; |
38 | 38 |
39 stream.notopen = true; | 39 stream.notopen = true; |
40 | 40 |
41 function stream.data(conn, data) | 41 function stream.data(conn, data) |