mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-16 22:05:07 -05:00
cleared up logging a little bit. no need for an entire stack trace at this point
This commit is contained in:
parent
2efb97efa0
commit
2b8dfc2bab
@ -10,6 +10,7 @@ import de.measite.minidns.record.Data;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -124,22 +125,16 @@ public class DNSHelper {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (SocketTimeoutException e) {
|
||||||
|
Log.d("xmppService", "timeout during dns");
|
||||||
|
namePort.putString("error", "timeout");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e("xmppService", "io execpiton during dns", e);
|
Log.d("xmppService","io exception during dns");
|
||||||
namePort.putString("error", "timeout");
|
namePort.putString("error", "timeout");
|
||||||
}
|
}
|
||||||
return namePort;
|
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();
|
final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
|
||||||
|
|
||||||
public static String bytesToHex(byte[] bytes) {
|
public static String bytesToHex(byte[] bytes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user