Added debugging screen to alpha and beta builds. Dev task #73.

This commit is contained in:
akwizgran
2014-02-28 23:44:35 +00:00
parent 07b4d9b5d8
commit a2d099ea17
20 changed files with 440 additions and 43 deletions

View File

@@ -72,7 +72,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
private final File torDirectory, torFile, geoIpFile, configFile, doneFile;
private final File cookieFile, pidFile, hostnameFile;
private volatile boolean running = false;
private volatile boolean running = false, networkEnabled = false;
private volatile Process tor = null;
private volatile int pid = -1;
private volatile ServerSocket socket = null;
@@ -509,6 +509,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
if(!running) return;
if(LOG.isLoggable(INFO)) LOG.info("Enabling network: " + enable);
controlConnection.setConf("DisableNetwork", enable ? "0" : "1");
networkEnabled = enable;
}
public void stop() throws IOException {
@@ -534,6 +535,10 @@ class TorPlugin implements DuplexPlugin, EventHandler {
}
}
public boolean isRunning() {
return running && networkEnabled;
}
public boolean shouldPoll() {
return true;
}