aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-10-16 19:47:01 +0000
committerRoger Dingledine <arma@torproject.org>2005-10-16 19:47:01 +0000
commitaca6fb5f5f3875a9e51cef8c60a45750944e84eb (patch)
tree2853714e1b5330deb3a3d579a79d6423ec84e179 /src/or/main.c
parent2a8218224399f85ae39fa1db731a7a85549b45e7 (diff)
downloadtor-aca6fb5f5f3875a9e51cef8c60a45750944e84eb.tar
tor-aca6fb5f5f3875a9e51cef8c60a45750944e84eb.tar.gz
cut out a warning that doesn't need to warn
svn:r5252
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 8d32cd80f..b61b23478 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -983,15 +983,13 @@ do_hup(void)
/* Write out a fresh descriptor, but leave old one on failure. */
router_rebuild_descriptor(1);
descriptor = router_get_my_descriptor();
- if (!descriptor) {
- log_fn(LOG_WARN,"No descriptor to save.");
- return 0;
- }
- tor_snprintf(keydir,sizeof(keydir),"%s/router.desc",
- options->DataDirectory);
- log_fn(LOG_INFO,"Saving descriptor to \"%s\"...",keydir);
- if (write_str_to_file(keydir, descriptor, 0)) {
- return 0;
+ if (descriptor) {
+ tor_snprintf(keydir,sizeof(keydir),"%s/router.desc",
+ options->DataDirectory);
+ log_fn(LOG_INFO,"Saving descriptor to \"%s\"...",keydir);
+ if (write_str_to_file(keydir, descriptor, 0)) {
+ return 0;
+ }
}
}
return 0;