commit 5551c59e50d70626a5cfb0f7efbffa0657498d9f
Author: Nathan Freitas <[email protected]>
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)



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to