use the new _PublishServerDescriptor to publish descriptors either

to v2 authorities or to bridge authorities, depending on config.


svn:r10137
This commit is contained in:
Roger Dingledine 2007-05-08 09:13:30 +00:00
parent e4f40dd794
commit a201861dc2

View File

@ -764,6 +764,7 @@ router_upload_dir_desc_to_dirservers(int force)
extrainfo_t *ei; extrainfo_t *ei;
char *msg; char *msg;
size_t desc_len, extra_len = 0, total_len; size_t desc_len, extra_len = 0, total_len;
authority_type_t auth = get_options()->_PublishServerDescriptor;
ri = router_get_my_routerinfo(); ri = router_get_my_routerinfo();
if (!ri) { if (!ri) {
@ -771,7 +772,7 @@ router_upload_dir_desc_to_dirservers(int force)
return; return;
} }
ei = router_get_my_extrainfo(); ei = router_get_my_extrainfo();
if (get_options()->_PublishServerDescriptor == NO_AUTHORITY) if (auth == NO_AUTHORITY)
return; return;
if (!force && !desc_needs_upload) if (!force && !desc_needs_upload)
return; return;
@ -787,7 +788,7 @@ router_upload_dir_desc_to_dirservers(int force)
} }
msg[desc_len+extra_len] = 0; msg[desc_len+extra_len] = 0;
directory_post_to_dirservers(DIR_PURPOSE_UPLOAD_DIR, V2_AUTHORITY, directory_post_to_dirservers(DIR_PURPOSE_UPLOAD_DIR, auth,
msg, desc_len, extra_len); msg, desc_len, extra_len);
tor_free(msg); tor_free(msg);
} }