Ticket #1741: 0001-Bug-1741-Quieten-spurious-Ancient-non-dirty-circuit-.patch

File 0001-Bug-1741-Quieten-spurious-Ancient-non-dirty-circuit-.patch, 2.1 KB (added by cjb, 9 years ago)
  • new file changes/bug1741

    From 13c64c41ffca68e49a2540fba947dabce23722c9 Mon Sep 17 00:00:00 2001
    From: Chris Ball <chris@printf.net>
    Date: Sun, 1 Aug 2010 19:36:41 -0400
    Subject: [PATCH] Bug #1741: Quieten spurious "Ancient non-dirty circuit" complaint.
    
    ---
     changes/bug1741     |    4 ++++
     src/or/circuituse.c |   18 +++++++++++-------
     2 files changed, 15 insertions(+), 7 deletions(-)
     create mode 100644 changes/bug1741
    
    diff --git a/changes/bug1741 b/changes/bug1741
    new file mode 100644
    index 0000000..aa14714
    - +  
     1  o Minor bugfixes:
     2    - Quieten spurious log complaint about an "Ancient non-dirty circuit".
     3      Bugfix in 0.2.2.14-alpha, closes bug 1741.
     4
  • src/or/circuituse.c

    diff --git a/src/or/circuituse.c b/src/or/circuituse.c
    index 63742da..3c4c10b 100644
    a b circuit_expire_old_circuits_clientside(time_t now) 
    746746                    (long)(now - circ->timestamp_created));
    747747          circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
    748748        } else if (!TO_ORIGIN_CIRCUIT(circ)->is_ancient) {
    749           log_notice(LD_CIRC,
    750                      "Ancient non-dirty circuit %d is still around after "
    751                      "%ld seconds. Purpose: %d",
    752                      TO_ORIGIN_CIRCUIT(circ)->global_identifier,
    753                      (long)(now - circ->timestamp_created),
    754                      circ->purpose);
    755           TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
     749          /* Bug #1741: Don't generate notices if we're purposefully holding
     750           * the circuit open for performance reasons. */
     751          if (circ->purpose != CIRCUIT_PURPOSE_S_REND_JOINED) {
     752            log_notice(LD_CIRC,
     753                       "Ancient non-dirty circuit %d is still around after "
     754                       "%ld seconds. Purpose: %d",
     755                       TO_ORIGIN_CIRCUIT(circ)->global_identifier,
     756                       (long)(now - circ->timestamp_created),
     757                       circ->purpose);
     758            TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
     759          }
    756760        }
    757761      }
    758762    }