[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] remove command line debug commands (don't work, cause failed pdnsd startup)



commit e8a6e14f09991e2c9a908c66367cfc315023f282
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Aug 11 15:47:08 2021 -0400

    remove command line debug commands (don't work, cause failed pdnsd startup)
---
 .../org/torproject/android/service/vpn/OrbotVpnManager.java   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
index 0f20b1c6..0ef9acfa 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
@@ -360,16 +360,16 @@ public class OrbotVpnManager implements Handler.Callback {
     }
 
     private void startDNS(String pdnsPath, String torDnsHost, int torDnsPort, String pdnsdHost, int pdnsdPort) throws IOException, TimeoutException {
-        String debugEnabledCmd = "";
+    //    String debugEnabledCmd = "";
         String debugEnabledConf = "off";
         if (Prefs.useDebugLogging()) {
-            debugEnabledCmd = "-g";
+      //      debugEnabledCmd = "-g";
             debugEnabledConf = "on";
         }
 
         File fileConf = makePdnsdConf(mService, mService.getFilesDir(), torDnsHost, torDnsPort, pdnsdHost, pdnsdPort, debugEnabledConf);
 
-        String[] cmdString = {pdnsPath, "-c", fileConf.toString(), debugEnabledCmd, "-v2"};
+        String[] cmdString = {pdnsPath, "-c", fileConf.toString(), "-v2"};
         ProcessBuilder pb = new ProcessBuilder(cmdString);
         pb.redirectErrorStream(true);
         Process proc = pb.start();
@@ -387,6 +387,11 @@ public class OrbotVpnManager implements Handler.Callback {
             while ((line = br.readLine()) != null) {
                 Log.d(TAG, "pdnsd: " + line);
             }
+
+            br = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
+            while ((line = br.readLine()) != null) {
+                Log.d(TAG, "pdnsd ERROR: " + line);
+            }
         }
 
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits