mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 22:12:05 +01:00
Fixes error parsing properties. SMACK-138
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2341 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
677b389ccc
commit
1d169dff08
1 changed files with 9 additions and 3 deletions
|
@ -748,10 +748,16 @@ class PacketReader {
|
||||||
int eventType = parser.next();
|
int eventType = parser.next();
|
||||||
if (eventType == XmlPullParser.START_TAG && parser.getName().equals("property")) {
|
if (eventType == XmlPullParser.START_TAG && parser.getName().equals("property")) {
|
||||||
// Advance to name element.
|
// Advance to name element.
|
||||||
// Skip CRs
|
|
||||||
parser.next();
|
parser.next();
|
||||||
parser.next();
|
// Depending on the server we may need to skip possible CRs
|
||||||
String name = parser.nextText();
|
eventType = parser.next();
|
||||||
|
String name;
|
||||||
|
if (eventType == XmlPullParser.TEXT) {
|
||||||
|
name = parser.getText();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
name = parser.nextText();
|
||||||
|
}
|
||||||
parser.next();
|
parser.next();
|
||||||
// Skip CRs
|
// Skip CRs
|
||||||
parser.next();
|
parser.next();
|
||||||
|
|
Loading…
Reference in a new issue