mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
hints for nick on where to integrate
svn:r273
This commit is contained in:
parent
b58939745e
commit
0f17d09066
@ -43,6 +43,7 @@ void directory_initiate_fetch(routerinfo_t *router) {
|
|||||||
conn->address = strdup(router->address);
|
conn->address = strdup(router->address);
|
||||||
conn->receiver_bucket = -1; /* edge connections don't do receiver buckets */
|
conn->receiver_bucket = -1; /* edge connections don't do receiver buckets */
|
||||||
conn->bandwidth = -1;
|
conn->bandwidth = -1;
|
||||||
|
conn->pkey = crypto_pk_dup_key(router->signing_pkey);
|
||||||
|
|
||||||
s=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
|
s=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
|
||||||
if(s < 0) {
|
if(s < 0) {
|
||||||
@ -116,6 +117,8 @@ void directory_set_dirty(void) {
|
|||||||
|
|
||||||
void directory_rebuild(void) {
|
void directory_rebuild(void) {
|
||||||
if(directory_dirty) {
|
if(directory_dirty) {
|
||||||
|
/* NICK: This is where the dirserver makes a new <the_directory,directorylen>
|
||||||
|
* (or whatever it'll be called in the future) pair. */
|
||||||
dump_directory_to_string(the_directory, MAX_DIR_SIZE);
|
dump_directory_to_string(the_directory, MAX_DIR_SIZE);
|
||||||
log(LOG_INFO,"New directory:\n%s",the_directory);
|
log(LOG_INFO,"New directory:\n%s",the_directory);
|
||||||
directorylen = strlen(the_directory);
|
directorylen = strlen(the_directory);
|
||||||
@ -141,6 +144,8 @@ int connection_dir_process_inbuf(connection_t *conn) {
|
|||||||
log(LOG_DEBUG,"connection_dir_process_inbuf(): Empty directory. Ignoring.");
|
log(LOG_DEBUG,"connection_dir_process_inbuf(): Empty directory. Ignoring.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
/* NICK: This is where the client parses, checks-the-signature-of, etc the
|
||||||
|
* new directory. conn->pkey is the signing key of the directory server we chose. */
|
||||||
if(router_get_list_from_string(the_directory) < 0) {
|
if(router_get_list_from_string(the_directory) < 0) {
|
||||||
log(LOG_DEBUG,"connection_dir_process_inbuf(): ...but parsing failed. Ignoring.");
|
log(LOG_DEBUG,"connection_dir_process_inbuf(): ...but parsing failed. Ignoring.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user