Commit 8c957910 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Parser is now reset after SASL authentication was successful. JM-413

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2870 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3ef81832
......@@ -517,8 +517,18 @@ public abstract class SocketReader implements Runnable {
sb.append("</stream:features>");
connection.deliverRawText(sb.toString());
// Skip the opening stream sent by the client
XmlPullParser xpp = reader.getXPPParser();
// Reset the parser since a new stream header has been sent from the client
if (connection.getTLSStreamHandler() == null) {
xpp.setInput(new InputStreamReader(socket.getInputStream(), CHARSET));
}
else {
xpp.setInput(new InputStreamReader(connection.getTLSStreamHandler().getInputStream(),
CHARSET));
}
// Skip the opening stream sent by the client
for (int eventType = xpp.getEventType(); eventType != XmlPullParser.START_TAG;) {
eventType = xpp.next();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment