summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-01-04 09:12:23 +0000
committerRoger Dingledine <arma@torproject.org>2007-01-04 09:12:23 +0000
commit5e89bc9b4b5158df5060489a91d7dbc7676274f8 (patch)
treef46a7c5b0c3ad4491a46348a7ca951cabcf776fb /src/or/directory.c
parenta66d86149b04bf28617603190b3488d6f71231a2 (diff)
downloadtor-5e89bc9b4b5158df5060489a91d7dbc7676274f8.tar.gz
tor-5e89bc9b4b5158df5060489a91d7dbc7676274f8.zip
fix a bug i introduced in r9249; and more cleanups.
svn:r9263
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 0d8934776a..5aea7c57d3 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -47,9 +47,10 @@ static int purpose_is_private(uint8_t purpose);
static char *http_get_header(const char *headers, const char *which);
static void http_set_address_origin(const char *headers, connection_t *conn);
static void connection_dir_download_networkstatus_failed(
- dir_connection_t *conn, int status);
+ dir_connection_t *conn, int status_code);
static void connection_dir_download_routerdesc_failed(dir_connection_t *conn);
-static void dir_networkstatus_download_failed(smartlist_t *failed, int status);
+static void dir_networkstatus_download_failed(smartlist_t *failed,
+ int status_code);
static void dir_routerdesc_download_failed(smartlist_t *failed,
int status_code);
static void note_request(const char *key, size_t bytes);
@@ -318,7 +319,7 @@ connection_dir_request_failed(dir_connection_t *conn)
*/
static void
connection_dir_download_networkstatus_failed(dir_connection_t *conn,
- int status)
+ int status_code)
{
if (!conn->requested_resource) {
/* We never reached directory_send_command, which means that we never
@@ -342,7 +343,7 @@ connection_dir_download_networkstatus_failed(dir_connection_t *conn,
dir_split_resource_into_fingerprints(conn->requested_resource+3,
failed, NULL, 0, 0);
if (smartlist_len(failed)) {
- dir_networkstatus_download_failed(failed, status);
+ dir_networkstatus_download_failed(failed, status_code);
SMARTLIST_FOREACH(failed, char *, cp, tor_free(cp));
}
smartlist_free(failed);
@@ -1957,9 +1958,9 @@ connection_dir_finished_connecting(dir_connection_t *conn)
* fingerprints listed in <b>failed</>). Mark those fingerprints as having
* failed once, unless they failed with status code 503. */
static void
-dir_networkstatus_download_failed(smartlist_t *failed, int status)
+dir_networkstatus_download_failed(smartlist_t *failed, int status_code)
{
- if (status == 503)
+ if (status_code == 503)
return;
SMARTLIST_FOREACH(failed, const char *, fp,
{