mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Regenerate our local descriptor if it's dirty and some local
function asks for it. This may resolve bug 286. svn:r6412
This commit is contained in:
parent
c74c24a989
commit
934e9c49bb
@ -760,8 +760,8 @@ router_get_my_routerinfo(void)
|
|||||||
if (!server_mode(get_options()))
|
if (!server_mode(get_options()))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!desc_routerinfo) {
|
if (!desc_routerinfo || !desc_clean_since) {
|
||||||
if (router_rebuild_descriptor(1))
|
if (router_rebuild_descriptor(!desc_routerinfo))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return desc_routerinfo;
|
return desc_routerinfo;
|
||||||
@ -774,10 +774,8 @@ const char *
|
|||||||
router_get_my_descriptor(void)
|
router_get_my_descriptor(void)
|
||||||
{
|
{
|
||||||
const char *body;
|
const char *body;
|
||||||
if (!desc_routerinfo) {
|
if (!router_get_my_routerinfo())
|
||||||
if (router_rebuild_descriptor(1))
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
body = signed_descriptor_get_body(&desc_routerinfo->cache_info);
|
body = signed_descriptor_get_body(&desc_routerinfo->cache_info);
|
||||||
log_debug(LD_GENERAL,"my desc is '%s'", body);
|
log_debug(LD_GENERAL,"my desc is '%s'", body);
|
||||||
return body;
|
return body;
|
||||||
|
Loading…
Reference in New Issue
Block a user