1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-16 12:12:06 +01:00

Add log statements to Roster

This commit is contained in:
Florian Schmaus 2014-04-29 14:52:03 +02:00
parent 6e12409b82
commit 10e82fae45

View file

@ -1043,12 +1043,15 @@ public class Roster {
String jid = StringUtils.parseBareAddress(connection.getUser()); String jid = StringUtils.parseBareAddress(connection.getUser());
if (rosterPacket.getFrom() != null && if (rosterPacket.getFrom() != null &&
!rosterPacket.getFrom().equals(jid)) { !rosterPacket.getFrom().equals(jid)) {
LOGGER.warning("Ignoring roster push with a non matching 'from' ourJid=" + jid
+ " from=" + rosterPacket.getFrom());
return; return;
} }
// A roster push must contain exactly one entry // A roster push must contain exactly one entry
Collection<Item> items = rosterPacket.getRosterItems(); Collection<Item> items = rosterPacket.getRosterItems();
if (items.size() != 1) { if (items.size() != 1) {
LOGGER.warning("Ignoring roster push with not exaclty one entry. size=" + items.size());
return; return;
} }