aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorCaio Valente <valentecaio95@gmail.com>2018-03-06 20:42:32 +0100
committerCaio Valente <valentecaio95@gmail.com>2018-03-06 20:42:32 +0100
commit8775c93a996fd864b1747c04eebe51534425ff51 (patch)
tree3e6c8b02de242582b8be67d537f47bc167fc83b5 /src/or/dirserv.c
parent699bb803baba942c6bcd50542183b283fa191163 (diff)
downloadtor-8775c93a996fd864b1747c04eebe51534425ff51.tar.gz
tor-8775c93a996fd864b1747c04eebe51534425ff51.zip
Refactor: suppress duplicated functions from router.c and encapsulate NODE_DESC_BUF_LEN constant.
Also encapsulates format_node_description(). Closes ticket 25432.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 7a693b9d43..7dae5ee9d1 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -858,13 +858,13 @@ directory_remove_invalid(void)
SMARTLIST_FOREACH_BEGIN(nodes, node_t *, node) {
const char *msg = NULL;
+ const char *description;
routerinfo_t *ent = node->ri;
- char description[NODE_DESC_BUF_LEN];
uint32_t r;
if (!ent)
continue;
r = dirserv_router_get_status(ent, &msg, LOG_INFO);
- router_get_description(description, ent);
+ description = router_describe(ent);
if (r & FP_REJECT) {
log_info(LD_DIRSERV, "Router %s is now rejected: %s",
description, msg?msg:"");