[tor-commits] [orbot/master] use new jtorctl constants for Tor event names

n8fr8 at torproject.org n8fr8 at torproject.org
Wed Dec 22 21:55:07 UTC 2021


commit afb3ae786b37722d5e3c699ad65af08eacdda5d2
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Fri Dec 13 22:39:28 2019 +0100

    use new jtorctl constants for Tor event names
    
    These include javadoc with links to the documentation.
---
 .../main/java/org/torproject/android/service/OrbotService.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index 844da292..24594ae9 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -975,7 +975,13 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
         try {
             logNotice("adding control port event handler");
             conn.setEventHandler(mEventHandler);
-            conn.setEvents(Arrays.asList("ORCONN", "CIRC", "NOTICE", "WARN", "ERR", "BW"));
+            conn.setEvents(Arrays.asList(
+                    TorControlCommands.EVENT_OR_CONN_STATUS,
+                    TorControlCommands.EVENT_CIRCUIT_STATUS,
+                    TorControlCommands.EVENT_NOTICE_MSG,
+                    TorControlCommands.EVENT_WARN_MSG,
+                    TorControlCommands.EVENT_ERR_MSG,
+                    TorControlCommands.EVENT_BANDWIDTH_USED));
             logNotice("SUCCESS added control port event handler");
         } catch (IOException e) {
             e.printStackTrace();





More information about the tor-commits mailing list