mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
Fix for class cast exception
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2052 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
e805172f46
commit
9f687f7f1c
1 changed files with 4 additions and 6 deletions
|
@ -296,8 +296,7 @@ public class XMPPConnection {
|
||||||
|
|
||||||
auth.setResource(resource);
|
auth.setResource(resource);
|
||||||
|
|
||||||
collector = packetReader.createPacketCollector(
|
collector = packetReader.createPacketCollector(new PacketIDFilter(auth.getPacketID()));
|
||||||
new PacketIDFilter(auth.getPacketID()));
|
|
||||||
// Send the packet.
|
// Send the packet.
|
||||||
packetWriter.sendPacket(auth);
|
packetWriter.sendPacket(auth);
|
||||||
// Wait up to five seconds for a response from the server.
|
// Wait up to five seconds for a response from the server.
|
||||||
|
@ -313,10 +312,9 @@ public class XMPPConnection {
|
||||||
this.user = response.getTo();
|
this.user = response.getTo();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Authentication authResponse = (Authentication)response;
|
this.user = username + "@" + this.host;
|
||||||
this.user = authResponse.getUsername() + "@" + this.host;
|
if (resource != null) {
|
||||||
if (authResponse.getResource() != null) {
|
this.user += "/" + resource;
|
||||||
this.user += "/" + authResponse.getResource();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// We're done with the collector, so explicitly cancel it.
|
// We're done with the collector, so explicitly cancel it.
|
||||||
|
|
Loading…
Reference in a new issue