[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix indentation on a block
commit cc10f13408e25eaf04f849d0f761680f383fa61d
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Apr 15 11:05:09 2015 -0400
Fix indentation on a block
---
src/or/control.c | 76 +++++++++++++++++++++++++++---------------------------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/or/control.c b/src/or/control.c
index fde3990..d4216d2 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2101,45 +2101,45 @@ getinfo_helper_events(control_connection_t *control_conn,
}
*answer = bridge_stats;
} else if (!strcmp(question, "status/fresh-relay-descs")) {
- if (!server_mode(get_options())) {
- *errmsg = "Only relays have descriptors";
- return -1;
- }
- routerinfo_t *r;
- extrainfo_t *e;
- if (router_build_fresh_descriptor(&r, &e) < 0) {
- *errmsg = "Error generating descriptor";
- return -1;
- }
- size_t size = r->cache_info.signed_descriptor_len + 1;
- if (e) {
- size += e->cache_info.signed_descriptor_len + 1;
- }
- tor_assert(r->cache_info.signed_descriptor_len);
- char *descs = tor_malloc(size);
- char *cp = descs;
- memcpy(cp, signed_descriptor_get_body(&r->cache_info),
- r->cache_info.signed_descriptor_len);
- cp += r->cache_info.signed_descriptor_len - 1;
- if (e) {
- if (cp[0] == '\0') {
- cp[0] = '\n';
- } else if (cp[0] != '\n') {
- cp[1] = '\n';
- cp++;
- }
- memcpy(cp, signed_descriptor_get_body(&e->cache_info),
- e->cache_info.signed_descriptor_len);
- cp += e->cache_info.signed_descriptor_len - 1;
- }
- if (cp[0] == '\n') {
- cp[0] = '\0';
- } else if (cp[0] != '\0') {
- cp[1] = '\0';
+ if (!server_mode(get_options())) {
+ *errmsg = "Only relays have descriptors";
+ return -1;
+ }
+ routerinfo_t *r;
+ extrainfo_t *e;
+ if (router_build_fresh_descriptor(&r, &e) < 0) {
+ *errmsg = "Error generating descriptor";
+ return -1;
+ }
+ size_t size = r->cache_info.signed_descriptor_len + 1;
+ if (e) {
+ size += e->cache_info.signed_descriptor_len + 1;
+ }
+ tor_assert(r->cache_info.signed_descriptor_len);
+ char *descs = tor_malloc(size);
+ char *cp = descs;
+ memcpy(cp, signed_descriptor_get_body(&r->cache_info),
+ r->cache_info.signed_descriptor_len);
+ cp += r->cache_info.signed_descriptor_len - 1;
+ if (e) {
+ if (cp[0] == '\0') {
+ cp[0] = '\n';
+ } else if (cp[0] != '\n') {
+ cp[1] = '\n';
+ cp++;
}
- *answer = descs;
- routerinfo_free(r);
- extrainfo_free(e);
+ memcpy(cp, signed_descriptor_get_body(&e->cache_info),
+ e->cache_info.signed_descriptor_len);
+ cp += e->cache_info.signed_descriptor_len - 1;
+ }
+ if (cp[0] == '\n') {
+ cp[0] = '\0';
+ } else if (cp[0] != '\0') {
+ cp[1] = '\0';
+ }
+ *answer = descs;
+ routerinfo_free(r);
+ extrainfo_free(e);
} else {
return 0;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits