[tor-commits] [tor/master] Include circ creation time in CIRC events, etc.

nickm at torproject.org nickm at torproject.org
Wed Jan 11 17:10:18 UTC 2012


commit 17113448d26f02576a2aabe8163ef5b65c810bae
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Sat Jun 25 19:05:43 2011 -0700

    Include circ creation time in CIRC events, etc.
---
 changes/feature3457 |    3 +++
 src/or/control.c    |   10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/changes/feature3457 b/changes/feature3457
index eda1d38..e2676cb 100644
--- a/changes/feature3457
+++ b/changes/feature3457
@@ -6,4 +6,7 @@
       circuit is cannibalized or its purpose is changed.  Implements
       part of ticket 3457.
 
+    - Include the creation time of a circuit in CIRC and CIRC2
+      control-port events and the list produced by the 'GETINFO
+      circuit-status' control-port command.
 
diff --git a/src/or/control.c b/src/or/control.c
index 5874fe1..eedc8ea 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1851,6 +1851,16 @@ circuit_describe_status_for_controller(origin_circuit_t *circ)
     smartlist_add(descparts, rend_query_arg);
   }
 
+  {
+    char *time_created_arg = NULL;
+
+    tor_asprintf(&time_created_arg, "TIME_CREATED=%ld,%ld",
+                 circ->_base.timestamp_created.tv_sec,
+                 circ->_base.timestamp_created.tv_usec);
+
+    smartlist_add(descparts, time_created_arg);
+  }
+
   rv = smartlist_join_strings(descparts, " ", 0, NULL);
 
   SMARTLIST_FOREACH(descparts, char *, cp, tor_free(cp));





More information about the tor-commits mailing list