Commit c10faf50 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

fix some irix compile complaints; make "kbytes" work as a memory unit


svn:r12936
parent 5b3e5e87
......@@ -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 },
......
......@@ -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);
......
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment