summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-08 05:37:22 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-08 05:37:22 +0000
commitc9e1c41873b13e3585c35761fd0b06823e607155 (patch)
treee12d0f42af12edfae38aaef5590c7d1f0c3921b7
parent03ddeb262095e0078330b9034a056ecd5a0d1627 (diff)
downloadtor-c9e1c41873b13e3585c35761fd0b06823e607155.tar.gz
tor-c9e1c41873b13e3585c35761fd0b06823e607155.zip
dirserv_add_descriptor() doesn't chew up its argument anymore,
so we can stop protecting it. svn:r4919
-rw-r--r--src/or/router.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 302bd53ab2..286b02f95d 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -251,7 +251,7 @@ init_keys(void)
char fingerprint[FINGERPRINT_LEN+1];
char fingerprint_line[FINGERPRINT_LEN+MAX_NICKNAME_LEN+3];/*nickname fp\n\0 */
char *cp;
- const char *tmp, *mydesc, *datadir;
+ const char *mydesc, *datadir;
crypto_pk_env_t *prkey;
char digest[20];
or_options_t *options = get_options();
@@ -317,7 +317,7 @@ init_keys(void)
}
/* 4. Dump router descriptor to 'router.desc' */
/* Must be called after keys are initialized. */
- tmp = mydesc = router_get_my_descriptor();
+ mydesc = router_get_my_descriptor();
if (!mydesc) {
log_fn(LOG_ERR, "Error initializing descriptor.");
return -1;
@@ -329,7 +329,7 @@ init_keys(void)
log_fn(LOG_ERR, "Error adding own fingerprint to approved set");
return -1;
}
- if (dirserv_add_descriptor(tmp, &m) < 0) {
+ if (dirserv_add_descriptor(mydesc, &m) < 0) {
log(LOG_ERR, "Unable to add own descriptor to directory: %s",
m?m:"<unknown error>");
return -1;