aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 8180c4eb7..fc40b410e 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -31,6 +31,7 @@ import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
@@ -1120,6 +1121,7 @@ public class XmppConnection implements Runnable {
public void sendDiscoTimeout() {
if (mWaitForDisco.compareAndSet(true, false)) {
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": finalizing bind after disco timeout");
finalizeBind();
}
}
@@ -1259,15 +1261,19 @@ public class XmppConnection implements Runnable {
@Override
public void onIqPacketReceived(final Account account, final IqPacket packet) {
if (packet.getType() == IqPacket.TYPE.RESULT) {
+ HashSet<Jid> items = new HashSet<Jid>();
final List<Element> elements = packet.query().getChildren();
for (final Element element : elements) {
if (element.getName().equals("item")) {
final Jid jid = element.getAttributeAsJid("jid");
if (jid != null && !jid.equals(account.getServer())) {
- sendServiceDiscoveryInfo(jid);
+ items.add(jid);
}
}
}
+ for (Jid jid : items) {
+ sendServiceDiscoveryInfo(jid);
+ }
} else {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not query disco items of " + server);
}