[PATCH] Bug in client code on connect


I’‘ve discovered a bug in the connection code. The disco#items request is sent to the host name, rather than the service name. This works fine as long as they are the same, but this is not the case on my server (I’‘m using SRV records to redirect to a different host name). Here’'s the patch:

--- PhoneClient.java    (revision 4918)
+++ PhoneClient.java    (working copy)
@@ -59,7 +59,7 @@
                         PhoneEventPacketExtension.NAMESPACE));          serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(conn);
-        DiscoverItems items = serviceDiscoveryManager.discoverItems(conn.getHost());
+        DiscoverItems items = serviceDiscoveryManager.discoverItems(conn.getServiceName());          // Attempt to discover the component jid and see if this user can use the phone service
         for (Iterator i = items.getItems(); i.hasNext();) {