[or-cvs] r12936: fix some irix compile complaints; make "kbytes" work as a me (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Sun Dec 23 04:22:55 UTC 2007
Author: arma
Date: 2007-12-22 23:22:55 -0500 (Sat, 22 Dec 2007)
New Revision: 12936
Modified:
tor/trunk/src/or/config.c
tor/trunk/src/or/or.h
tor/trunk/src/or/router.c
Log:
fix some irix compile complaints; make "kbytes" work as a memory unit
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2007-12-23 01:31:39 UTC (rev 12935)
+++ tor/trunk/src/or/config.c 2007-12-23 04:22:55 UTC (rev 12936)
@@ -871,16 +871,16 @@
/* 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 @@
}
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 @@
{ "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 },
Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h 2007-12-23 01:31:39 UTC (rev 12935)
+++ tor/trunk/src/or/or.h 2007-12-23 04:22:55 UTC (rev 12936)
@@ -3878,7 +3878,7 @@
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);
Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c 2007-12-23 01:31:39 UTC (rev 12935)
+++ tor/trunk/src/or/router.c 2007-12-23 04:22:55 UTC (rev 12936)
@@ -551,11 +551,11 @@
}
/* 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,
More information about the tor-commits
mailing list