diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-08-15 13:55:01 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-08-15 13:55:01 +0000 |
commit | fcf817f8976fb4ae2a255d54d1fc1eb1b11fdbfb (patch) | |
tree | 27232258dc79ac038d485f3a85efef9e703b5718 /src/or/or.h | |
parent | 1fcbd9f2337d8670080ba5c2a9d0518d78380a92 (diff) | |
download | tor-fcf817f8976fb4ae2a255d54d1fc1eb1b11fdbfb.tar.gz tor-fcf817f8976fb4ae2a255d54d1fc1eb1b11fdbfb.zip |
Switch global_identifier on connections to a 64-bit field and move it to connection_t. When procession onionskins, look up the connection by this field rather than by addr:port. This will keep us from dropping onionskins. How many dropped circuits are dropped because of this bug?
svn:r16558
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/or/or.h b/src/or/or.h index ceecd9296b..80bcd1b745 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -904,6 +904,9 @@ typedef struct connection_t { /** Another connection that's connected to this one in lieu of a socket. */ struct connection_t *linked_conn; + /** Unique identifier for this connection. */ + uint64_t global_identifier; + /* XXXX021 move this into a subtype. */ struct evdns_server_port *dns_server_port; @@ -1014,10 +1017,6 @@ typedef struct edge_connection_t { /** The reason why this connection is closing; passed to the controller. */ uint16_t end_reason; - /** Quasi-global identifier for this connection; used for control.c */ - /* XXXX NM This can get re-used after 2**32 streams */ - uint32_t global_identifier; - /** Bytes read since last call to control_event_stream_bandwidth_used() */ uint32_t n_read; @@ -2858,9 +2857,7 @@ connection_write_to_buf_zlib(const char *string, size_t len, _connection_write_to_buf_impl(string, len, TO_CONN(conn), done ? -1 : 1); } -or_connection_t *connection_or_exact_get_by_addr_port(uint32_t addr, - uint16_t port); -edge_connection_t *connection_get_by_global_id(uint32_t id); +connection_t *connection_get_by_global_id(uint64_t id); connection_t *connection_get_by_type(int type); connection_t *connection_get_by_type_purpose(int type, int purpose); |