summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-06-08 19:45:17 +0000
committerRoger Dingledine <arma@torproject.org>2005-06-08 19:45:17 +0000
commit9ed7b53143be20fd6286bbd220597d7ff5bb52c1 (patch)
tree3873a2abd0b2b7fa3b3b32b062d2001542ea854e /src
parent8b2a7ff9feb3dc779f2f7e7cf4784442adfba4ab (diff)
downloadtor-9ed7b53143be20fd6286bbd220597d7ff5bb52c1.tar.gz
tor-9ed7b53143be20fd6286bbd220597d7ff5bb52c1.zip
don't upload your descriptor if rebuilding it failed
svn:r4352
Diffstat (limited to 'src')
-rw-r--r--src/or/or.h2
-rw-r--r--src/or/router.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 916476cf7e..f55f837731 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -162,7 +162,7 @@
/** How long do we keep DNS cache entries before purging them? */
#define MAX_DNS_ENTRY_AGE (150*60)
#else
-#define MAX_DNS_ENTRY_AGE (15*60)
+#define MAX_DNS_ENTRY_AGE (30*60)
#endif
/** How often do we rotate onion keys? */
diff --git a/src/or/router.c b/src/or/router.c
index 6bcc678d52..56ad0d0caf 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -500,8 +500,8 @@ static int decide_if_publishable_server(time_t now) {
void consider_publishable_server(time_t now, int force) {
if (decide_if_publishable_server(now)) {
set_server_advertised(1);
- router_rebuild_descriptor(force);
- router_upload_dir_desc_to_dirservers(force);
+ if (router_rebuild_descriptor(force) == 0)
+ router_upload_dir_desc_to_dirservers(force);
} else {
set_server_advertised(0);
}