From 223a03e6173937056cb1387b626cef4193676953 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Sat, 6 Mar 2010 15:02:04 +0000 Subject: [PATCH] added Privoxy running confirmation; also reachableports and relay support (added by ioerror) have been double-checked svn:r21830 --- src/org/torproject/android/service/TorService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index ecb0a652..b9e08c25 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -447,8 +447,11 @@ public class TorService extends Service implements TorServiceConstants, Runnable String[] cmds = { PRIVOXY_INSTALL_PATH + " " + PRIVOXY_COMMAND_LINE_ARGS }; TorServiceUtils.doShellCommand(cmds, log, false, true); + Thread.sleep(1000); + privoxyProcId = TorServiceUtils.findProcessId(TorServiceConstants.PRIVOXY_INSTALL_PATH); + if (privoxyProcId == -1) { this.sendCallbackMessage("Couldn't start Privoxy process... retrying...\n" + log); @@ -456,6 +459,9 @@ public class TorService extends Service implements TorServiceConstants, Runnable } } + sendCallbackMessage("Privoxy is running on port: " + PORT_HTTP); + Thread.sleep(100); + Log.i(TAG,"Privoxy process id=" + privoxyProcId);