Browse Source

Include circ creation time in CIRC events, etc.

Robert Ransom 13 years ago
parent
commit
17113448d2
2 changed files with 13 additions and 0 deletions
  1. 3 0
      changes/feature3457
  2. 10 0
      src/or/control.c

+ 3 - 0
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.
 

+ 10 - 0
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));