]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use monotime_coarse_absolute_msec() in destroy queue
authorNick Mathewson <nickm@torproject.org>
Thu, 21 Dec 2017 15:48:37 +0000 (10:48 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 21 Dec 2017 15:48:37 +0000 (10:48 -0500)
This way it will match the insert queue in 029 and later.

src/or/relay.c

index 3bf740348ad0a66b44649b902681ad3fcfa58f19..29f34ca0334e1dc91bb5a8d04ac38197e038706a 100644 (file)
@@ -2417,14 +2417,11 @@ destroy_cell_queue_append(destroy_cell_queue_t *queue,
                           circid_t circid,
                           uint8_t reason)
 {
-  struct timeval now;
-
   destroy_cell_t *cell = tor_malloc_zero(sizeof(destroy_cell_t));
   cell->circid = circid;
   cell->reason = reason;
-  tor_gettimeofday_cached_monotonic(&now);
   /* Not yet used, but will be required for OOM handling. */
-  cell->inserted_time = (uint32_t)tv_to_msec(&now);
+  cell->inserted_time = (uint32_t) monotime_coarse_absolute_msec();
 
   TOR_SIMPLEQ_INSERT_TAIL(&queue->head, cell, next);
   ++queue->n;