mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 21:59:54 +01:00
Remove old migration code for Tor settings.
This commit is contained in:
@@ -195,8 +195,6 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
|||||||
if (!assetsAreUpToDate()) installAssets();
|
if (!assetsAreUpToDate()) installAssets();
|
||||||
if (cookieFile.exists() && !cookieFile.delete())
|
if (cookieFile.exists() && !cookieFile.delete())
|
||||||
LOG.warning("Old auth cookie not deleted");
|
LOG.warning("Old auth cookie not deleted");
|
||||||
// Migrate old settings before having a chance to stop
|
|
||||||
migrateSettings();
|
|
||||||
// Start a new Tor process
|
// Start a new Tor process
|
||||||
LOG.info("Starting Tor");
|
LOG.info("Starting Tor");
|
||||||
String torPath = torFile.getAbsolutePath();
|
String torPath = torFile.getAbsolutePath();
|
||||||
@@ -816,21 +814,6 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
|||||||
controlConnection.setConf("ConnectionPadding", enable ? "1" : "0");
|
controlConnection.setConf("ConnectionPadding", enable ? "1" : "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO remove when sufficient time has passed. Added 2018-08-15
|
|
||||||
private void migrateSettings() {
|
|
||||||
Settings sOld = callback.getSettings();
|
|
||||||
int oldNetwork = sOld.getInt("network", -1);
|
|
||||||
if (oldNetwork == -1) return;
|
|
||||||
Settings s = new Settings();
|
|
||||||
if (oldNetwork == 0) {
|
|
||||||
s.putInt(PREF_TOR_NETWORK, PREF_TOR_NETWORK_NEVER);
|
|
||||||
} else if (oldNetwork == 1) {
|
|
||||||
s.putBoolean(PREF_TOR_MOBILE, false);
|
|
||||||
}
|
|
||||||
s.putInt("network", -1);
|
|
||||||
callback.mergeSettings(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ConnectionStatus {
|
private static class ConnectionStatus {
|
||||||
|
|
||||||
// All of the following are locking: this
|
// All of the following are locking: this
|
||||||
|
|||||||
Reference in New Issue
Block a user