Commit 150ac992 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Improved #receivedAnswer to not fail if IQ result has no child element.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9152 b35dd754-fafc-0310-a699-88a17e54d16e
parent b98576e7
...@@ -373,6 +373,7 @@ public class UserManager implements IQResultListener { ...@@ -373,6 +373,7 @@ public class UserManager implements IQResultListener {
// Analyze the disco result packet // Analyze the disco result packet
if (IQ.Type.result == packet.getType()) { if (IQ.Type.result == packet.getType()) {
Element child = packet.getChildElement(); Element child = packet.getChildElement();
if (child != null) {
for (Iterator it=child.elementIterator("identity"); it.hasNext();) { for (Iterator it=child.elementIterator("identity"); it.hasNext();) {
Element identity = (Element) it.next(); Element identity = (Element) it.next();
String accountType = identity.attributeValue("type"); String accountType = identity.attributeValue("type");
...@@ -382,6 +383,7 @@ public class UserManager implements IQResultListener { ...@@ -382,6 +383,7 @@ public class UserManager implements IQResultListener {
} }
} }
} }
}
// Update cache of remote registered users // Update cache of remote registered users
remoteUsersCache.put(from.toBareJID(), isRegistered); remoteUsersCache.put(from.toBareJID(), isRegistered);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment