Disable all hashing benchmarks in Syncthing (ref syncthing/syncthing#4348)

This commit is contained in:
Felix Ableitner 2017-09-04 15:54:39 +09:00
parent 7e37c14a82
commit 76ca22526b
3 changed files with 12 additions and 3 deletions

@ -1 +1 @@
Subproject commit 8d13e01342bf74c1006c7527c16e088f7a66d0c1 Subproject commit 107a20f6ad7a7f105ebebc73940f378f183ef4b0

View File

@ -136,6 +136,7 @@ public class SyncthingRunnable implements Runnable {
env.put("STGUIASSETS", externalFilesDir.getAbsolutePath() + "/gui"); env.put("STGUIASSETS", externalFilesDir.getAbsolutePath() + "/gui");
env.put("STNORESTART", "1"); env.put("STNORESTART", "1");
env.put("STNOUPGRADE", "1"); env.put("STNOUPGRADE", "1");
env.put("STHASHING", "minio");
if (sp.getBoolean("use_tor", false)) { if (sp.getBoolean("use_tor", false)) {
env.put("all_proxy", "socks5://localhost:9050"); env.put("all_proxy", "socks5://localhost:9050");
env.put("ALL_PROXY_NO_FALLBACK", "1"); env.put("ALL_PROXY_NO_FALLBACK", "1");

View File

@ -103,8 +103,8 @@ public class ConfigXml {
/** /**
* Updates the config file. * Updates the config file.
* *
* Sets ignorePerms flag to true on every folder, force enables TLS, and sets the * Sets ignorePerms flag to true on every folder, force enables TLS, sets the
* username/password. * username/password, and disables weak hash checking.
*/ */
@SuppressWarnings("SdCardPath") @SuppressWarnings("SdCardPath")
public void updateIfNeeded() { public void updateIfNeeded() {
@ -163,6 +163,14 @@ public class ConfigXml {
changed = true; changed = true;
} }
Element options = (Element) mConfig.getDocumentElement()
.getElementsByTagName("options").item(0);
Node weakHash = options.getElementsByTagName("weakHashSelectionMethod").item(0);
if (!weakHash.getTextContent().equals("never")) {
weakHash.setTextContent("never");
changed = true;
}
if (changed) { if (changed) {
saveChanges(); saveChanges();
} }