Commit 17113448 authored by Robert Ransom's avatar Robert Ransom
Browse files

Include circ creation time in CIRC events, etc.

parent 88e0026d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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));