Comparison

util/xmppstream.lua @ 5321:33813f000015

Merge 0.9->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 03 Feb 2013 15:52:27 +0100
parent 5311:86fe6e2fa5ae
child 5776:bd0ff8ae98a8
child 6042:1107d66d2ab2
comparison
equal deleted inserted replaced
5303:19a4a3462574 5321:33813f000015
43 function new_sax_handlers(session, stream_callbacks) 43 function new_sax_handlers(session, stream_callbacks)
44 local xml_handlers = {}; 44 local xml_handlers = {};
45 45
46 local cb_streamopened = stream_callbacks.streamopened; 46 local cb_streamopened = stream_callbacks.streamopened;
47 local cb_streamclosed = stream_callbacks.streamclosed; 47 local cb_streamclosed = stream_callbacks.streamclosed;
48 local cb_error = stream_callbacks.error or function(session, e) error("XML stream error: "..tostring(e)); end; 48 local cb_error = stream_callbacks.error or function(session, e, stanza) error("XML stream error: "..tostring(e)..(stanza and ": "..tostring(stanza) or ""),2); end;
49 local cb_handlestanza = stream_callbacks.handlestanza; 49 local cb_handlestanza = stream_callbacks.handlestanza;
50 50
51 local stream_ns = stream_callbacks.stream_ns or xmlns_streams; 51 local stream_ns = stream_callbacks.stream_ns or xmlns_streams;
52 local stream_tag = stream_callbacks.stream_tag or "stream"; 52 local stream_tag = stream_callbacks.stream_tag or "stream";
53 if stream_ns ~= "" then 53 if stream_ns ~= "" then