Comparison

util/xmppstream.lua @ 6363:ec446efc15e1

util.xmppstream: When error is 'no-stream', pass the received tagname to the error handler
author Matthew Wild <mwild1@gmail.com>
date Sat, 23 Aug 2014 09:22:05 +0100
parent 6053:2f93a04564b2
child 6367:769a3577dd85
comparison
equal deleted inserted replaced
6362:f5f44504e18b 6363:ec446efc15e1
107 end 107 end
108 cb_streamopened(session, attr); 108 cb_streamopened(session, attr);
109 end 109 end
110 else 110 else
111 -- Garbage before stream? 111 -- Garbage before stream?
112 cb_error(session, "no-stream"); 112 cb_error(session, "no-stream", tagname);
113 end 113 end
114 return; 114 return;
115 end 115 end
116 if curr_ns == "jabber:client" and name ~= "iq" and name ~= "presence" and name ~= "message" then 116 if curr_ns == "jabber:client" and name ~= "iq" and name ~= "presence" and name ~= "message" then
117 cb_error(session, "invalid-top-level-element"); 117 cb_error(session, "invalid-top-level-element");