]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use router_get_my_routerinfo_with_err to implement the old version
authorNick Mathewson <nickm@torproject.org>
Mon, 14 May 2018 18:12:36 +0000 (14:12 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 May 2018 18:12:36 +0000 (14:12 -0400)
Having one function implemented in terms of the other should keep
them from diverging.

follow-up on #25852

src/or/router.c

index 47416640d92d33572d9b9ffe7103b13f86edafaf..ea65977882feb90724821055f9b0f69cb472bc8c 100644 (file)
@@ -2076,11 +2076,7 @@ router_is_me(const routerinfo_t *router)
 MOCK_IMPL(const routerinfo_t *,
 router_get_my_routerinfo,(void))
 {
-  if (!server_mode(get_options()))
-    return NULL;
-  if (router_rebuild_descriptor(0))
-    return NULL;
-  return desc_routerinfo;
+  return router_get_my_routerinfo_with_err(NULL);
 }
 
 /** Return routerinfo of this OR. Rebuild it from