diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-08-17 16:05:09 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-08-17 16:05:09 -0400 |
commit | 1c64f99a1a74cac4074ddefa958fd4ae7acddcb2 (patch) | |
tree | d47ca63f67fe817a7a87fe77f88976aa8908753b /src | |
parent | 63dfc1d9b6e6d488f32c99c3ffad882f6fbe0f51 (diff) | |
parent | e13e9c40c829d15fb71310b0638fff859b85580a (diff) | |
download | tor-1c64f99a1a74cac4074ddefa958fd4ae7acddcb2.tar.gz tor-1c64f99a1a74cac4074ddefa958fd4ae7acddcb2.zip |
Merge remote-tracking branch 'public/bug5124'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 2 | ||||
-rw-r--r-- | src/or/policies.c | 3 | ||||
-rw-r--r-- | src/or/rephist.c | 2 | ||||
-rw-r--r-- | src/or/router.c | 14 | ||||
-rw-r--r-- | src/test/test_dir.c | 6 |
5 files changed, 13 insertions, 14 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 90b81015f4..041e525fc3 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2129,7 +2129,7 @@ routerstatus_format_entry(char *buf, size_t buf_len, /* length of "opt v \n" */ #define V_LINE_OVERHEAD 7 if (version && strlen(version) < MAX_V_LINE_LEN - V_LINE_OVERHEAD) { - if (tor_snprintf(cp, buf_len - (cp-buf), "opt v %s\n", version)<0) { + if (tor_snprintf(cp, buf_len - (cp-buf), "v %s\n", version)<0) { log_warn(LD_BUG, "Unable to print router version."); return -1; } diff --git a/src/or/policies.c b/src/or/policies.c index 3018803bc4..798bb846fa 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -1004,8 +1004,7 @@ policy_write_item(char *buf, size_t buflen, addr_policy_t *policy, else addrpart = addrbuf; - result = tor_snprintf(buf, buflen, "%s%s%s %s", - (is_ip6&&format_for_desc)?"opt ":"", + result = tor_snprintf(buf, buflen, "%s%s %s", is_accept ? "accept" : "reject", (is_ip6&&format_for_desc)?"6":"", addrpart); diff --git a/src/or/rephist.c b/src/or/rephist.c index fa02f981f3..1c5b511100 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1531,7 +1531,7 @@ rep_hist_get_bandwidth_lines(void) const char *desc = NULL; size_t len; - /* opt [dirreq-](read|write)-history yyyy-mm-dd HH:MM:SS (n s) n,n,n... */ + /* [dirreq-](read|write)-history yyyy-mm-dd HH:MM:SS (n s) n,n,n... */ /* The n,n,n part above. Largest representation of a uint64_t is 20 chars * long, plus the comma. */ #define MAX_HIST_VALUE_LEN 21*NUM_TOTALS diff --git a/src/or/router.c b/src/or/router.c index 1d45d56598..3b24caef29 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2055,9 +2055,9 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, "router %s %s %d 0 %d\n" "%s" "platform %s\n" - "opt protocols Link 1 2 Circuit 1\n" + "protocols Link 1 2 Circuit 1\n" "published %s\n" - "opt fingerprint %s\n" + "fingerprint %s\n" "uptime %ld\n" "bandwidth %d %d %d\n" "%s%s%s%s" @@ -2076,15 +2076,15 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, (int) router->bandwidthrate, (int) router->bandwidthburst, (int) router->bandwidthcapacity, - has_extra_info_digest ? "opt extra-info-digest " : "", + has_extra_info_digest ? "extra-info-digest " : "", has_extra_info_digest ? extra_info_digest : "", has_extra_info_digest ? "\n" : "", - options->DownloadExtraInfo ? "opt caches-extra-info\n" : "", + options->DownloadExtraInfo ? "caches-extra-info\n" : "", onion_pkey, identity_pkey, family_line, - we_are_hibernating() ? "opt hibernating 1\n" : "", - options->HidServDirectoryV2 ? "opt hidden-service-dir\n" : "", - options->AllowSingleHopExits ? "opt allow-single-hop-exits\n" : ""); + we_are_hibernating() ? "hibernating 1\n" : "", + options->HidServDirectoryV2 ? "hidden-service-dir\n" : "", + options->AllowSingleHopExits ? "allow-single-hop-exits\n" : ""); tor_free(family_line); tor_free(onion_pkey); diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 83c612045b..84705d0e02 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -147,9 +147,9 @@ test_dir_formats(void) "platform Tor "VERSION" on ", sizeof(buf2)); strlcat(buf2, get_uname(), sizeof(buf2)); strlcat(buf2, "\n" - "opt protocols Link 1 2 Circuit 1\n" + "protocols Link 1 2 Circuit 1\n" "published 1970-01-01 00:00:00\n" - "opt fingerprint ", sizeof(buf2)); + "fingerprint ", sizeof(buf2)); test_assert(!crypto_pk_get_fingerprint(pk2, fingerprint, 1)); strlcat(buf2, fingerprint, sizeof(buf2)); strlcat(buf2, "\nuptime 0\n" @@ -161,7 +161,7 @@ test_dir_formats(void) strlcat(buf2, pk1_str, sizeof(buf2)); strlcat(buf2, "signing-key\n", sizeof(buf2)); strlcat(buf2, pk2_str, sizeof(buf2)); - strlcat(buf2, "opt hidden-service-dir\n", sizeof(buf2)); + strlcat(buf2, "hidden-service-dir\n", sizeof(buf2)); strlcat(buf2, "reject *:*\nrouter-signature\n", sizeof(buf2)); buf[strlen(buf2)] = '\0'; /* Don't compare the sig; it's never the same * twice */ |