From 59e393e2ef1d0264e868d793d32ca0e6422c20ee Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sat, 27 Aug 2005 02:24:38 +0000 Subject: [PATCH] Replaced #getHost with #getServiceName. SMACK-75 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2731 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/AccountManager.java | 8 ++++---- source/org/jivesoftware/smackx/muc/MultiUserChat.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/org/jivesoftware/smack/AccountManager.java b/source/org/jivesoftware/smack/AccountManager.java index dbc0d6eaf..7fb515d7b 100644 --- a/source/org/jivesoftware/smack/AccountManager.java +++ b/source/org/jivesoftware/smack/AccountManager.java @@ -186,7 +186,7 @@ public class AccountManager { } Registration reg = new Registration(); reg.setType(IQ.Type.SET); - reg.setTo(connection.getHost()); + reg.setTo(connection.getServiceName()); attributes.put("username",username); attributes.put("password",password); reg.setAttributes(attributes); @@ -216,7 +216,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.setTo(connection.getServiceName()); HashMap map = new HashMap(); map.put("username",StringUtils.parseName(connection.getUser())); map.put("password",newPassword); @@ -250,7 +250,7 @@ public class AccountManager { } Registration reg = new Registration(); reg.setType(IQ.Type.SET); - reg.setTo(connection.getHost()); + reg.setTo(connection.getServiceName()); Map attributes = new HashMap(); // To delete an account, we add a single attribute, "remove", that is blank. attributes.put("remove", ""); @@ -277,7 +277,7 @@ public class AccountManager { */ private synchronized void getRegistrationInfo() throws XMPPException { Registration reg = new Registration(); - reg.setTo(connection.getHost()); + reg.setTo(connection.getServiceName()); PacketFilter filter = new AndFilter(new PacketIDFilter(reg.getPacketID()), new PacketTypeFilter(IQ.class)); PacketCollector collector = connection.createPacketCollector(filter); diff --git a/source/org/jivesoftware/smackx/muc/MultiUserChat.java b/source/org/jivesoftware/smackx/muc/MultiUserChat.java index fc53a5bb8..056297eee 100644 --- a/source/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/source/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -206,7 +206,7 @@ public class MultiUserChat { public static Collection getServiceNames(XMPPConnection connection) throws XMPPException { List answer = new ArrayList(); ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); - DiscoverItems items = discoManager.discoverItems(connection.getHost()); + DiscoverItems items = discoManager.discoverItems(connection.getServiceName()); for (Iterator it = items.getItems(); it.hasNext();) { DiscoverItems.Item item = (DiscoverItems.Item) it.next(); DiscoverInfo info = discoManager.discoverInfo(item.getEntityID());