From ab245746a9e5a73d57e881ae9cb73f2f499a1bb6 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 30 Sep 2005 04:43:42 +0000 Subject: [PATCH] Hey kids, guess why connection_mark_for_close() started giving an assert when called for an even-numbered line? Right, because I made it a bitfield, when it was really a line number. Why did I think it was a bitfield? A stale comment. Let that be a lesson to us all. svn:r5164 --- src/or/or.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/or/or.h b/src/or/or.h index 2c85de4f01..d09ed701ea 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -597,9 +597,6 @@ struct connection_t { unsigned wants_to_write:1; /**< Boolean: should we start writing again once * the bandwidth throttler allows reads? */ - unsigned marked_for_close:1; /**< Boolean: should we close this conn on the - * next iteration of the main loop? - */ unsigned hold_open_until_flushed:1; /**< Despite this connection's being * marked for close, do we flush it * before closing it? @@ -612,6 +609,10 @@ struct connection_t { int poll_index; /* XXXX rename. */ struct event *read_event; /**< libevent event structure. */ struct event *write_event; /**< libevent event structure. */ + int marked_for_close; /**< Should we close this conn on the next iteration + * of the main loop? (If true, holds the line number + * where this connection was marked.) + */ const char *marked_for_close_file; /**< For debugging: in which file were * we marked for close? */ @@ -984,7 +985,8 @@ struct circuit_t { uint32_t magic; /**< For memory debugging: must equal CIRCUIT_MAGIC. */ int marked_for_close; /**< Should we close this circuit at the end of the - * main loop? */ + * main loop? (If true, holds the line number where + * this circuit was marked.) */ const char *marked_for_close_file; /**< For debugging: in which file was this * circuit marked for close? */