[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] dirserv_add_descriptor() doesn"t chew up its argument anymo...
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
router.c
Log Message:
dirserv_add_descriptor() doesn't chew up its argument anymore,
so we can stop protecting it.
Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- router.c 8 Sep 2005 05:32:41 -0000 1.203
+++ router.c 8 Sep 2005 05:37:22 -0000 1.204
@@ -251,7 +251,7 @@
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 @@
}
/* 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 @@
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;