]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add debug logging for channel_free() and channel_force_free()
authorAndrea Shepard <andrea@torproject.org>
Mon, 15 Oct 2012 13:46:23 +0000 (06:46 -0700)
committerAndrea Shepard <andrea@torproject.org>
Mon, 15 Oct 2012 13:46:23 +0000 (06:46 -0700)
src/or/channel.c

index 56e15b48b899c43ca7682d5450e03ced09dd1394..2642431267f9bf8e2ed3f4d6c82acc129d389fde 100644 (file)
@@ -808,6 +808,10 @@ channel_free(channel_t *chan)
   /* It must be deregistered */
   tor_assert(!(chan->registered));
 
+  log_debug(LD_CHANNEL,
+            "Freeing channel " U64_FORMAT " at %p",
+            U64_PRINTF_ARG(chan->global_identifier), chan);
+
   /*
    * Get rid of cmux policy before we do anything, so cmux policies don't
    * see channels in weird half-freed states.
@@ -872,6 +876,10 @@ channel_force_free(channel_t *chan)
 {
   tor_assert(chan);
 
+  log_debug(LD_CHANNEL,
+            "Force-freeing channel " U64_FORMAT " at %p",
+            U64_PRINTF_ARG(chan->global_identifier), chan);
+
   /*
    * Get rid of cmux policy before we do anything, so cmux policies don't
    * see channels in weird half-freed states.