From 25e44819845d9b005a764ce03327bb5abe9d378c Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Sun, 23 Mar 2003 23:02:10 +0000 Subject: [PATCH] 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 --- source/org/jivesoftware/smack/AccountManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/org/jivesoftware/smack/AccountManager.java b/source/org/jivesoftware/smack/AccountManager.java index 0e9edaafb..032f57660 100644 --- a/source/org/jivesoftware/smack/AccountManager.java +++ b/source/org/jivesoftware/smack/AccountManager.java @@ -176,6 +176,7 @@ public class AccountManager { } Registration reg = new Registration(); reg.setType(IQ.Type.SET); + reg.setTo(connection.getHost()); reg.setUsername(username); reg.setPassword(password); reg.setAttributes(attributes); @@ -203,6 +204,7 @@ public class AccountManager { public void changePassword(String newPassword) throws XMPPException { Registration reg = new Registration(); reg.setType(IQ.Type.SET); + reg.setTo(connection.getHost()); reg.setUsername(connection.getUsername()); reg.setPassword(newPassword); PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()), @@ -232,6 +234,7 @@ public class AccountManager { } Registration reg = new Registration(); reg.setType(IQ.Type.SET); + reg.setTo(connection.getHost()); Map attributes = new HashMap(); // To delete an account, we add a single attribute, "remove", that is blank. attributes.put("remove", ""); @@ -256,6 +259,7 @@ public class AccountManager { */ private synchronized void getRegistrationInfo() throws XMPPException { Registration reg = new Registration(); + reg.setTo(connection.getHost()); PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()), new PacketTypeFilter(IQ.class)); PacketCollector collector = connection.createPacketCollector(filter);