mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-15 20:12:04 +01:00
Set "to" field of requests to be compatibile with more servers.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1853 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
f0ef12eed5
commit
25e4481984
1 changed files with 4 additions and 0 deletions
|
@ -176,6 +176,7 @@ public class AccountManager {
|
||||||
}
|
}
|
||||||
Registration reg = new Registration();
|
Registration reg = new Registration();
|
||||||
reg.setType(IQ.Type.SET);
|
reg.setType(IQ.Type.SET);
|
||||||
|
reg.setTo(connection.getHost());
|
||||||
reg.setUsername(username);
|
reg.setUsername(username);
|
||||||
reg.setPassword(password);
|
reg.setPassword(password);
|
||||||
reg.setAttributes(attributes);
|
reg.setAttributes(attributes);
|
||||||
|
@ -203,6 +204,7 @@ public class AccountManager {
|
||||||
public void changePassword(String newPassword) throws XMPPException {
|
public void changePassword(String newPassword) throws XMPPException {
|
||||||
Registration reg = new Registration();
|
Registration reg = new Registration();
|
||||||
reg.setType(IQ.Type.SET);
|
reg.setType(IQ.Type.SET);
|
||||||
|
reg.setTo(connection.getHost());
|
||||||
reg.setUsername(connection.getUsername());
|
reg.setUsername(connection.getUsername());
|
||||||
reg.setPassword(newPassword);
|
reg.setPassword(newPassword);
|
||||||
PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()),
|
PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()),
|
||||||
|
@ -232,6 +234,7 @@ public class AccountManager {
|
||||||
}
|
}
|
||||||
Registration reg = new Registration();
|
Registration reg = new Registration();
|
||||||
reg.setType(IQ.Type.SET);
|
reg.setType(IQ.Type.SET);
|
||||||
|
reg.setTo(connection.getHost());
|
||||||
Map attributes = new HashMap();
|
Map attributes = new HashMap();
|
||||||
// To delete an account, we add a single attribute, "remove", that is blank.
|
// To delete an account, we add a single attribute, "remove", that is blank.
|
||||||
attributes.put("remove", "");
|
attributes.put("remove", "");
|
||||||
|
@ -256,6 +259,7 @@ public class AccountManager {
|
||||||
*/
|
*/
|
||||||
private synchronized void getRegistrationInfo() throws XMPPException {
|
private synchronized void getRegistrationInfo() throws XMPPException {
|
||||||
Registration reg = new Registration();
|
Registration reg = new Registration();
|
||||||
|
reg.setTo(connection.getHost());
|
||||||
PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()),
|
PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()),
|
||||||
new PacketTypeFilter(IQ.class));
|
new PacketTypeFilter(IQ.class));
|
||||||
PacketCollector collector = connection.createPacketCollector(filter);
|
PacketCollector collector = connection.createPacketCollector(filter);
|
||||||
|
|
Loading…
Reference in a new issue