diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-03 10:12:50 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-03 10:12:50 +0200 |
commit | 2b8dfc2babfdbb9d63ddd3f83326940d5ed5817c (patch) | |
tree | 5a2eb46bd259bf54be2e853122dac8779ae9d7e1 /src/eu/siacs/conversations | |
parent | 2efb97efa04bd39b520fff825b1e741edb9c2228 (diff) |
cleared up logging a little bit. no need for an entire stack trace at this point
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r-- | src/eu/siacs/conversations/utils/DNSHelper.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/eu/siacs/conversations/utils/DNSHelper.java b/src/eu/siacs/conversations/utils/DNSHelper.java index c5a3eeb0..eb9680e9 100644 --- a/src/eu/siacs/conversations/utils/DNSHelper.java +++ b/src/eu/siacs/conversations/utils/DNSHelper.java @@ -10,6 +10,7 @@ import de.measite.minidns.record.Data; import java.io.IOException; import java.net.InetAddress; +import java.net.SocketTimeoutException; import java.util.ArrayList; import java.util.Collections; import java.util.Random; @@ -124,22 +125,16 @@ public class DNSHelper { i++; } + } catch (SocketTimeoutException e) { + Log.d("xmppService", "timeout during dns"); + namePort.putString("error", "timeout"); } catch (IOException e) { - Log.e("xmppService", "io execpiton during dns", e); + Log.d("xmppService","io exception during dns"); namePort.putString("error", "timeout"); } return namePort; } - static int calcPort(byte hb, byte lb) { - int port = ((int) hb << 8) | ((int) lb & 0xFF); - if (port >= 0) { - return port; - } else { - return 65536 + port; - } - } - final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); public static String bytesToHex(byte[] bytes) { |