[tor-commits] [orbot/master] fixes to ensure service does not block
n8fr8 at torproject.org
n8fr8 at torproject.org
Thu Apr 17 15:36:58 UTC 2014
commit 5551c59e50d70626a5cfb0f7efbffa0657498d9f
Author: Nathan Freitas <nathan at freitas.net>
Date: Thu Apr 17 10:16:56 2014 -0400
fixes to ensure service does not block
---
src/org/torproject/android/service/TorService.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 7f889c0..441bd1e 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -738,6 +738,9 @@ public class TorService extends Service implements TorServiceConstants, TorConst
String torrcPath = new File(appBinHome, TORRC_ASSET_KEY).getAbsolutePath();
+ // if (ENABLE_DEBUG_LOG)
+ // torrcPath = new File(appBinHome, TORRCDIAG_ASSET_KEY).getAbsolutePath();
+
boolean transProxyTethering = prefs.getBoolean("pref_transparent_tethering", false);
if (transProxyTethering)
@@ -745,7 +748,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
torrcPath = new File(appBinHome, TORRC_TETHER_KEY).getAbsolutePath();
}
-
int procId = -1;
int torRetryWaitTimeMS = 1000;
@@ -759,11 +761,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
SimpleCommand cmdTor = new SimpleCommand(fileTor.getAbsolutePath() + " DataDirectory " + appCacheHome.getAbsolutePath() + " -f " + torrcPath + " &");
shell.add(cmdTor);
- if (TorService.ENABLE_DEBUG_LOG)
- {
- logNotice("Tor exit code=" + cmdTor.getExitCode() + ";output=" + cmdTor.getOutput());
- }
-
//wait a few seconds
Thread.sleep(torRetryWaitTimeMS);
@@ -1393,7 +1390,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
}
catch (IOException ioe){
- logMessage("error requesting newny: " + ioe.getLocalizedMessage());
+ logMessage("error requesting newnym: " + ioe.getLocalizedMessage());
}
}
}.start();
@@ -1502,7 +1499,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
}
- private synchronized void sendCallbackLogMessage (String logMessage)
+ private void sendCallbackLogMessage (String logMessage)
{
if (mCallbacks == null)
More information about the tor-commits
mailing list