Attempts to fix slowly loaded contact list.

cusax-fix
Sebastien Vincent 15 years ago
parent 68ae55b717
commit 3fca394c5b

@ -179,6 +179,11 @@ public class ProtocolProviderServiceJabberImpl
private static final String IS_CALLING_DISABLED
= "net.java.sip.communicator.impl.protocol.jabber.CALLING_DISABLED";
/**
* Smack packet reply timeout.
*/
public static final int SMACK_PACKET_REPLY_TIMEOUT = 45000;
/**
* Used to connect to a XMPP server.
*/
@ -656,7 +661,7 @@ private ConnectState connectUsingSRVRecords(
* protocol is Google Talk, the user ID including the service name is used.
* For other protocols, if the login with the user ID without the service
* name fails, a second attempt including the service name is made.
*
*
* @param currentAddress the IP address to connect to
* @param password the password of the user
* @param serviceName the domain name of the user's login
@ -755,7 +760,7 @@ private void loadResource()
/**
* Load the password from the account configuration or ask the user.
*
*
* @param authority SecurityAuthority
* @param reasonCode the authentication reason code. Indicates the reason of
* this authentication.
@ -820,7 +825,7 @@ private String loadPassword(SecurityAuthority authority, int reasonCode)
/**
* Sets the global proxy information based on the configuration
*
*
* @throws OperationFailedException
*/
private void loadProxy() throws OperationFailedException
@ -1473,9 +1478,6 @@ protected void initialize(String screenname,
OperationSetGenericNotifications.class,
new OperationSetGenericNotificationsJabberImpl(this));
// let sufficient time for packet reply
SmackConfiguration.setPacketReplyTimeout(45000);
isInitialized = true;
}
}

@ -449,7 +449,12 @@ public void addContact(ContactGroup parent, String id)
if(parent != null)
parentNames = new String[]{parent.getGroupName()};
// modify our reply timeout because some XMPP may send "result" IQ
// late (> 5 secondes).
SmackConfiguration.setPacketReplyTimeout(
ProtocolProviderServiceJabberImpl.SMACK_PACKET_REPLY_TIMEOUT);
this.roster.createEntry(completeID, completeID, parentNames);
SmackConfiguration.setPacketReplyTimeout(5000);
}
catch (XMPPException ex)
{
@ -720,9 +725,14 @@ public void moveContact(ContactJabberImpl contact,
{
// will create the entry with the new group so it can be removed
// from other groups if any
// modify our reply timeout because some XMPP may send "result" IQ
// late (> 5 secondes).
SmackConfiguration.setPacketReplyTimeout(
ProtocolProviderServiceJabberImpl.SMACK_PACKET_REPLY_TIMEOUT);
roster.createEntry(contact.getSourceEntry().getUser(),
contact.getDisplayName(),
new String[]{newParent.getGroupName()});
SmackConfiguration.setPacketReplyTimeout(5000);
}
catch (XMPPException ex)
{

Loading…
Cancel
Save