diff options
author | Roger Dingledine <arma@torproject.org> | 2006-04-25 07:31:16 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-04-25 07:31:16 +0000 |
commit | b172270bcb57a0546057966e45b633bc4119cce4 (patch) | |
tree | a8c3d8c03de5e3ccc0ac3db15df0a0cd7ddab6ef /src/or/router.c | |
parent | 312beb994020d32cece89c94078b72ad796cd208 (diff) | |
download | tor-b172270bcb57a0546057966e45b633bc4119cce4.tar.gz tor-b172270bcb57a0546057966e45b633bc4119cce4.zip |
do some backporting. bug 285 is not yet backported.
svn:r6423
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/or/router.c b/src/or/router.c index 16174acdc7..7cd7255b67 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -760,10 +760,9 @@ router_get_my_routerinfo(void) if (!server_mode(get_options())) return NULL; - if (!desc_routerinfo) { - if (router_rebuild_descriptor(1)) + if (!desc_routerinfo || !desc_clean_since) + if (router_rebuild_descriptor(!desc_routerinfo)) return NULL; - } return desc_routerinfo; } @@ -774,10 +773,8 @@ const char * router_get_my_descriptor(void) { const char *body; - if (!desc_routerinfo) { - if (router_rebuild_descriptor(1)) - return NULL; - } + if (!router_get_my_routerinfo()) + return NULL; body = signed_descriptor_get_body(&desc_routerinfo->cache_info); log_debug(LD_GENERAL,"my desc is '%s'", body); return body; |