From 0c37abf1e9d9d285f601a9f8aa128bf4382685fd Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 26 Mar 2014 00:17:26 +0100 Subject: [PATCH] made work around not being a work around any more --- src/eu/siacs/conversations/utils/DNSHelper.java | 5 ++--- src/eu/siacs/conversations/xml/XmlReader.java | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/eu/siacs/conversations/utils/DNSHelper.java b/src/eu/siacs/conversations/utils/DNSHelper.java index d28a727c5..8953e3e5f 100644 --- a/src/eu/siacs/conversations/utils/DNSHelper.java +++ b/src/eu/siacs/conversations/utils/DNSHelper.java @@ -96,9 +96,8 @@ public class DNSHelper { ++i; } builder.replace(0, 1, ""); - - //TODO: workaround. speak proper dns later - if (!builder.toString().contains(".")) { + byte type = receiveData[i+1]; + if (type!=-64) { namePort.putString("error", "nosrv"); return namePort; } diff --git a/src/eu/siacs/conversations/xml/XmlReader.java b/src/eu/siacs/conversations/xml/XmlReader.java index 131141ddd..fdf5835a9 100644 --- a/src/eu/siacs/conversations/xml/XmlReader.java +++ b/src/eu/siacs/conversations/xml/XmlReader.java @@ -47,12 +47,9 @@ public class XmlReader { public Tag readTag() throws XmlPullParserException, IOException { if (wakeLock.isHeld()) { - //Log.d(LOGTAG,"there was a wake lock. releasing it till next event"); wakeLock.release(); //release wake look while waiting on next parser event } - //Log.d(LOGTAG,"waiting for new event..."); while(parser.next() != XmlPullParser.END_DOCUMENT) { - //Log.d(LOGTAG,"found new event. acquiring wake lock"); wakeLock.acquire(); if (parser.getEventType() == XmlPullParser.START_TAG) { Tag tag = Tag.start(parser.getName());