1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 06:11:19 +00:00

Replace (newly formatted) announce server address with IP (fixes #191).

This commit is contained in:
Felix Ableitner 2015-01-19 21:19:06 +01:00
parent 3d9e09a818
commit 1506541796

View file

@ -114,10 +114,9 @@ public class ConfigXml {
// Hardcode default globalAnnounceServer ip.
Element globalAnnounceServer = (Element)
options.getElementsByTagName("globalAnnounceServer").item(0);
if (globalAnnounceServer.getTextContent().startsWith("announce.syncthing.net:") ||
globalAnnounceServer.getTextContent().startsWith("194.126.249.5:")) {
if (globalAnnounceServer.getTextContent().equals("udp4://announce.syncthing.net:22026")) {
Log.i(TAG, "Replacing globalAnnounceServer host with ip");
globalAnnounceServer.setTextContent("194.126.249.5:22026");
globalAnnounceServer.setTextContent("udp4://194.126.249.5:22026");
changed = true;
}