diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-30 04:43:42 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-30 04:43:42 +0000 |
commit | ab245746a9e5a73d57e881ae9cb73f2f499a1bb6 (patch) | |
tree | 6f25df5e843a3ef36bccbdb18a4fc180ed461c2a /src/or/or.h | |
parent | 13e709a0ff0179124c6c35858a3cf3f0b9f8789b (diff) | |
download | tor-ab245746a9e5a73d57e881ae9cb73f2f499a1bb6.tar.gz tor-ab245746a9e5a73d57e881ae9cb73f2f499a1bb6.zip |
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
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 10 |
1 files 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? */ |