diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-12 16:33:31 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-15 16:12:45 +0200 |
commit | 3c051325758c0aeeeb44054715e16d8b8717948c (patch) | |
tree | a9e595b28ce218f3998ed0d3a10f54fc55eefd4e /src/or/connection.c | |
parent | 72c5a46b43c6d89c773a99240a95301b91b1f269 (diff) | |
download | tor-3c051325758c0aeeeb44054715e16d8b8717948c.tar.gz tor-3c051325758c0aeeeb44054715e16d8b8717948c.zip |
Directories now also measure download times of network statuses.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 0897eb4a5e..309421051a 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2302,6 +2302,13 @@ connection_handle_write(connection_t *conn, int force) /* else open, or closing */ result = flush_buf_tls(or_conn->tls, conn->outbuf, max_to_write, &conn->outbuf_flushlen); +#ifdef ENABLE_GEOIP_STATS + /* If we just flushed the last bytes, check if this tunneled dir + * request is done. */ + if (buf_datalen(conn->outbuf) == 0 && conn->request_id) + geoip_change_dirreq_state(conn->request_id, REQUEST_TUNNELED, + OR_CONN_BUFFER_FLUSHED); +#endif switch (result) { CASE_TOR_TLS_ERROR_ANY: case TOR_TLS_CLOSE: |