Ver código fonte

Disable logging to control port connections in buf_shrink_freelists.

If buf_shrink_freelists calls log_warn for some reason, we don't want the log
call itself to throw buf_shrink_freelists further off the rails.
Robert Ransom 14 anos atrás
pai
commit
a421e284d0
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      src/or/buffers.c

+ 2 - 0
src/or/buffers.c

@@ -251,6 +251,7 @@ buf_shrink_freelists(int free_all)
 {
 #ifdef ENABLE_BUF_FREELISTS
   int i;
+  disable_control_logging();
   for (i = 0; freelists[i].alloc_size; ++i) {
     int slack = freelists[i].slack;
     assert_freelist_ok(&freelists[i]);
@@ -296,6 +297,7 @@ buf_shrink_freelists(int free_all)
     freelists[i].lowest_length = freelists[i].cur_length;
     assert_freelist_ok(&freelists[i]);
   }
+  enable_control_logging();
 #else
   (void) free_all;
 #endif