diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-14 22:24:50 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-15 16:14:14 +0200 |
commit | 416940d93bac49f78b57a2cf561bd324d75b391f (patch) | |
tree | 583a474c27bd579a3676657eac04a35764fcc387 /src/or/directory.c | |
parent | 85e7f67e1c773e81a0269858169a9992eeb53da6 (diff) | |
download | tor-416940d93bac49f78b57a2cf561bd324d75b391f.tar.gz tor-416940d93bac49f78b57a2cf561bd324d75b391f.zip |
Some tweaks to directory request download times.
- Use common prefixes DIRREQ_* and dirreq_*.
- Replace enums in structs with bitfields.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index e5230c2cbd..c6faeae2e1 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2570,12 +2570,12 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, geoip_note_ns_response(act, GEOIP_SUCCESS); /* Note that a request for a network status has started, so that we * can measure the download time later on. */ - if (TO_CONN(conn)->request_id) - geoip_start_dirreq(TO_CONN(conn)->request_id, dlen, act, - REQUEST_TUNNELED); + if (TO_CONN(conn)->dirreq_id) + geoip_start_dirreq(TO_CONN(conn)->dirreq_id, dlen, act, + DIRREQ_TUNNELED); else geoip_start_dirreq(TO_CONN(conn)->global_identifier, dlen, act, - REQUEST_DIRECT); + DIRREQ_DIRECT); } } #endif @@ -3214,12 +3214,13 @@ connection_dir_finished_flushing(dir_connection_t *conn) /* Note that we have finished writing the directory response. For direct * connections this means we're done, for tunneled connections its only * an intermediate step. */ - if (TO_CONN(conn)->request_id) - geoip_change_dirreq_state(TO_CONN(conn)->request_id, REQUEST_TUNNELED, - FLUSHING_DIR_CONN_FINISHED); + if (TO_CONN(conn)->dirreq_id) + geoip_change_dirreq_state(TO_CONN(conn)->dirreq_id, DIRREQ_TUNNELED, + DIRREQ_FLUSHING_DIR_CONN_FINISHED); else geoip_change_dirreq_state(TO_CONN(conn)->global_identifier, - REQUEST_DIRECT, FLUSHING_DIR_CONN_FINISHED); + DIRREQ_DIRECT, + DIRREQ_FLUSHING_DIR_CONN_FINISHED); #endif switch (conn->_base.state) { case DIR_CONN_STATE_CLIENT_SENDING: |