1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 04:22:05 +01:00

Allows registration entries with blank values. SMACK-151

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2381 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-09-16 14:42:23 +00:00 committed by gdombiak
parent 10e7cbb20e
commit f103a16a07

View file

@ -529,20 +529,22 @@ class PacketReader {
// attempt to parse it if it's in the form <name>value</name>. // attempt to parse it if it's in the form <name>value</name>.
else if (parser.getNamespace().equals("jabber:iq:register")) { else if (parser.getNamespace().equals("jabber:iq:register")) {
String name = parser.getName(); String name = parser.getName();
if (parser.next() == XmlPullParser.TEXT) { String value = "";
String value = parser.getText(); if (fields == null) {
// Ignore instructions, but anything else should be added to the map. fields = new HashMap();
if (!name.equals("instructions")) {
if (fields == null) {
fields = new HashMap();
}
fields.put(name, value);
}
else {
registration.setInstructions(value);
}
} }
}
if (parser.next() == XmlPullParser.TEXT) {
value = parser.getText();
}
// Ignore instructions, but anything else should be added to the map.
if (!name.equals("instructions")) {
fields.put(name, value);
}
else {
registration.setInstructions(value);
}
}
// Otherwise, it must be a packet extension. // Otherwise, it must be a packet extension.
else { else {
registration.addExtension( registration.addExtension(