mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
dirserv_add_descriptor() doesn't chew up its argument anymore,
so we can stop protecting it. svn:r4919
This commit is contained in:
parent
03ddeb2620
commit
c9e1c41873
@ -251,7 +251,7 @@ init_keys(void)
|
|||||||
char fingerprint[FINGERPRINT_LEN+1];
|
char fingerprint[FINGERPRINT_LEN+1];
|
||||||
char fingerprint_line[FINGERPRINT_LEN+MAX_NICKNAME_LEN+3];/*nickname fp\n\0 */
|
char fingerprint_line[FINGERPRINT_LEN+MAX_NICKNAME_LEN+3];/*nickname fp\n\0 */
|
||||||
char *cp;
|
char *cp;
|
||||||
const char *tmp, *mydesc, *datadir;
|
const char *mydesc, *datadir;
|
||||||
crypto_pk_env_t *prkey;
|
crypto_pk_env_t *prkey;
|
||||||
char digest[20];
|
char digest[20];
|
||||||
or_options_t *options = get_options();
|
or_options_t *options = get_options();
|
||||||
@ -317,7 +317,7 @@ init_keys(void)
|
|||||||
}
|
}
|
||||||
/* 4. Dump router descriptor to 'router.desc' */
|
/* 4. Dump router descriptor to 'router.desc' */
|
||||||
/* Must be called after keys are initialized. */
|
/* Must be called after keys are initialized. */
|
||||||
tmp = mydesc = router_get_my_descriptor();
|
mydesc = router_get_my_descriptor();
|
||||||
if (!mydesc) {
|
if (!mydesc) {
|
||||||
log_fn(LOG_ERR, "Error initializing descriptor.");
|
log_fn(LOG_ERR, "Error initializing descriptor.");
|
||||||
return -1;
|
return -1;
|
||||||
@ -329,7 +329,7 @@ init_keys(void)
|
|||||||
log_fn(LOG_ERR, "Error adding own fingerprint to approved set");
|
log_fn(LOG_ERR, "Error adding own fingerprint to approved set");
|
||||||
return -1;
|
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",
|
log(LOG_ERR, "Unable to add own descriptor to directory: %s",
|
||||||
m?m:"<unknown error>");
|
m?m:"<unknown error>");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user