mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
r15558@tombo: nickm | 2007-12-18 22:55:23 -0500
Re-parse annotations in another place. Good catch, arma. svn:r12868
This commit is contained in:
parent
07c7f9e9e7
commit
95d500f33f
2
doc/TODO
2
doc/TODO
@ -42,6 +42,8 @@ R . spec
|
|||||||
- Track consecutive time up, not time since last-forgotten IP.
|
- Track consecutive time up, not time since last-forgotten IP.
|
||||||
o Add log lines.
|
o Add log lines.
|
||||||
o Tests
|
o Tests
|
||||||
|
- Run a tweaked version on peacetime. Verify lack of kaboom.
|
||||||
|
- Write some basic unit tests.
|
||||||
- Mention in dir-spec.txt
|
- Mention in dir-spec.txt
|
||||||
- Mention in control-spec.txt
|
- Mention in control-spec.txt
|
||||||
d let Vidalia use the geoip data too rather than doing its own
|
d let Vidalia use the geoip data too rather than doing its own
|
||||||
|
@ -2506,18 +2506,19 @@ routerlist_replace(routerlist_t *rl, routerinfo_t *ri_old,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** DOCDOC -NM */
|
/** Extract the descriptor <b>sd</b> from old_routerlist, and re-parse
|
||||||
/* XXX020 why are we dropping all router annotations here? -RD */
|
* it as a fresh routerinfo_t. */
|
||||||
static routerinfo_t *
|
static routerinfo_t *
|
||||||
routerlist_reparse_old(routerlist_t *rl, signed_descriptor_t *sd)
|
routerlist_reparse_old(routerlist_t *rl, signed_descriptor_t *sd)
|
||||||
{
|
{
|
||||||
routerinfo_t *ri;
|
routerinfo_t *ri;
|
||||||
const char *body;
|
const char *body;
|
||||||
|
|
||||||
body = signed_descriptor_get_body(sd);
|
body = signed_descriptor_get_annotations(sd);
|
||||||
|
|
||||||
ri = router_parse_entry_from_string(body, body+sd->signed_descriptor_len,
|
ri = router_parse_entry_from_string(body,
|
||||||
0, 0, NULL);
|
body+sd->signed_descriptor_len+sd->annotations_len,
|
||||||
|
0, 1, NULL);
|
||||||
if (!ri)
|
if (!ri)
|
||||||
return NULL;
|
return NULL;
|
||||||
memcpy(&ri->cache_info, sd, sizeof(signed_descriptor_t));
|
memcpy(&ri->cache_info, sd, sizeof(signed_descriptor_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user