diff options
author | Roger Dingledine <arma@torproject.org> | 2007-12-23 04:22:55 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-12-23 04:22:55 +0000 |
commit | c10faf50858943edafe042664b49f8a743df6d7c (patch) | |
tree | c4434fb3d1f9d7a3a3dbf872cc68ce9e1883ab76 /src | |
parent | 5b3e5e87bc705b8c55c8272c38aa8d888ba41c75 (diff) | |
download | tor-c10faf50858943edafe042664b49f8a743df6d7c.tar.gz tor-c10faf50858943edafe042664b49f8a743df6d7c.zip |
fix some irix compile complaints; make "kbytes" work as a memory unit
svn:r12936
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 22 | ||||
-rw-r--r-- | src/or/or.h | 2 | ||||
-rw-r--r-- | src/or/router.c | 10 |
3 files changed, 20 insertions, 14 deletions
diff --git a/src/or/config.c b/src/or/config.c index 045a9b9a00..ab69d0a6d3 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -871,16 +871,16 @@ validate_dir_authorities(or_options_t *options, or_options_t *old_options) /* Now go through the four ways you can configure an alternate * set of directory authorities, and make sure none are broken. */ for (cl = options->DirServers; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateBridgeAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateDirAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateHSAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; return 0; } @@ -922,16 +922,16 @@ consider_adding_dir_authorities(or_options_t *options, } for (cl = options->DirServers; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateBridgeAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateDirAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateHSAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; return 0; } @@ -4206,13 +4206,19 @@ static struct unit_table_t memory_units[] = { { "byte", 1<< 0 }, { "bytes", 1<< 0 }, { "kb", 1<<10 }, + { "kbyte", 1<<10 }, + { "kbytes", 1<<10 }, { "kilobyte", 1<<10 }, { "kilobytes", 1<<10 }, { "m", 1<<20 }, { "mb", 1<<20 }, + { "mbyte", 1<<20 }, + { "mbytes", 1<<20 }, { "megabyte", 1<<20 }, { "megabytes", 1<<20 }, { "gb", 1<<30 }, + { "gbyte", 1<<30 }, + { "gbytes", 1<<30 }, { "gigabyte", 1<<30 }, { "gigabytes", 1<<30 }, { "tb", U64_LITERAL(1)<<40 }, diff --git a/src/or/or.h b/src/or/or.h index e33cfc68fe..8be6717a64 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3878,7 +3878,7 @@ int router_digest_version_as_new_as(const char *digest, const char *cutoff); int router_digest_is_trusted_dir_type(const char *digest, authority_type_t type); #define router_digest_is_trusted_dir(d) \ - router_digest_is_trusted_dir_type((d), 0) + router_digest_is_trusted_dir_type((d), NO_AUTHORITY) int router_addr_is_trusted_dir(uint32_t addr); int hexdigest_to_digest(const char *hexdigest, char *digest); diff --git a/src/or/router.c b/src/or/router.c index a64320f11b..510b0b773c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -551,11 +551,11 @@ init_keys(void) } /* 6b. [authdirserver only] add own key to approved directories. */ crypto_pk_get_digest(get_identity_key(), digest); - type = ((options->V1AuthoritativeDir ? V1_AUTHORITY : 0) | - (options->V2AuthoritativeDir ? V2_AUTHORITY : 0) | - (options->V3AuthoritativeDir ? V3_AUTHORITY : 0) | - (options->BridgeAuthoritativeDir ? BRIDGE_AUTHORITY : 0) | - (options->HSAuthoritativeDir ? HIDSERV_AUTHORITY : 0)); + type = ((options->V1AuthoritativeDir ? V1_AUTHORITY : NO_AUTHORITY) | + (options->V2AuthoritativeDir ? V2_AUTHORITY : NO_AUTHORITY) | + (options->V3AuthoritativeDir ? V3_AUTHORITY : NO_AUTHORITY) | + (options->BridgeAuthoritativeDir ? BRIDGE_AUTHORITY : NO_AUTHORITY) | + (options->HSAuthoritativeDir ? HIDSERV_AUTHORITY : NO_AUTHORITY)); if (!router_digest_is_trusted_dir(digest)) { add_trusted_dir_server(options->Nickname, NULL, |