diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java index 69c168c..c502824 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java @@ -691,7 +691,7 @@ public class OperationSetPersistentPresenceJabberImpl */ assertConnected(); - XMPPConnection xmppConnection = parentProvider.getConnection(); + Connection xmppConnection = parentProvider.getConnection(); if (xmppConnection == null) { @@ -1124,7 +1124,7 @@ public class OperationSetPersistentPresenceJabberImpl ssContactList.cleanup(); - XMPPConnection connection = parentProvider.getConnection(); + Connection connection = parentProvider.getConnection(); if(connection != null) { connection.removePacketListener(subscribtionPacketListener); @@ -1528,6 +1528,19 @@ public class OperationSetPersistentPresenceJabberImpl o2, parentProvider).getStatus() - jabberStatusToPresenceStatus( o1, parentProvider).getStatus(); + // We have run out of "logical" ways to order + // the presences inside the TreeSet. We have + // make sure we are consinstent with equals. + // We do this by comparing the unique resource + // names. If this evaluates to 0 again, then we + // can safely assume this presence object + // represents the same resource and by that the + // same client. + if(res == 0) + { + res = o1.getFrom().compareTo( + o2.getFrom()); + } } return res; |