mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 22:12:05 +01:00
Fixed parsing of SUCCESS during SASL. SMACK-258
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@10856 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
f73c015eeb
commit
1a3fb47b5f
1 changed files with 11 additions and 11 deletions
|
@ -338,17 +338,6 @@ class PacketReader {
|
||||||
connection.getSASLAuthentication().challengeReceived(parser.nextText());
|
connection.getSASLAuthentication().challengeReceived(parser.nextText());
|
||||||
}
|
}
|
||||||
else if (parser.getName().equals("success")) {
|
else if (parser.getName().equals("success")) {
|
||||||
// We now need to bind a resource for the connection
|
|
||||||
// Open a new stream and wait for the response
|
|
||||||
connection.packetWriter.openStream();
|
|
||||||
|
|
||||||
// Reset the state of the parser since a new stream element is going
|
|
||||||
// to be sent by the server
|
|
||||||
resetParser();
|
|
||||||
|
|
||||||
// The SASL authentication with the server was successful. The next step
|
|
||||||
// will be to bind the resource
|
|
||||||
connection.getSASLAuthentication().authenticated();
|
|
||||||
}
|
}
|
||||||
else if (parser.getName().equals("compressed")) {
|
else if (parser.getName().equals("compressed")) {
|
||||||
// Server confirmed that it's possible to use stream compression. Start
|
// Server confirmed that it's possible to use stream compression. Start
|
||||||
|
@ -364,6 +353,17 @@ class PacketReader {
|
||||||
// Disconnect the connection
|
// Disconnect the connection
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
}
|
}
|
||||||
|
else if (parser.getName().equals("success")) {
|
||||||
|
// We now need to bind a resource for the connection
|
||||||
|
// Open a new stream and wait for the response
|
||||||
|
connection.packetWriter.openStream();
|
||||||
|
// Reset the state of the parser since a new stream element is going
|
||||||
|
// to be sent by the server
|
||||||
|
resetParser();
|
||||||
|
// The SASL authentication with the server was successful. The next step
|
||||||
|
// will be to bind the resource
|
||||||
|
connection.getSASLAuthentication().authenticated();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
eventType = parser.next();
|
eventType = parser.next();
|
||||||
} while (!done && eventType != XmlPullParser.END_DOCUMENT && thread == readerThread);
|
} while (!done && eventType != XmlPullParser.END_DOCUMENT && thread == readerThread);
|
||||||
|
|
Loading…
Reference in a new issue