aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-03-11 22:15:03 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-03-11 22:15:03 +0100
commit85901329b0794b136b96bf745f4ab1572806fc89 (patch)
treef23da7e97cae727f39d825f0fef8348cffb238e4 /src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
parent3db2e44f186c59429901b2c899e139ea60117a55 (diff)
parentcf5da997da8820b4050f5b87ee9440a0ede36d1f (diff)
downloadjitsi-master.zip
jitsi-master.tar.gz
jitsi-master.tar.bz2
Merge commit 'cf5da99'HEADmaster
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
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.java17
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;